in

Switch Package Manager

Switch Package Manager_628c0bced7555.jpeg

Well, I’m working on projects that use different Package Managers and I’m a little tired of writing wrong commands or mixing the incorrect flags.

I’ve started creating a command cheatsheet to guide me through, but if speak with truth, it was not enough, because don’t solve the problem at all.

So, inspired by projects like NVM and Volta I’ve decided to create a CLI translator, to write command in only one form and this CLI tool will translate it to the current package manager form used in the project.

That’s how swpm (Switch Package Manager) was born.

This is an example of how #swpm works. The same command, no matter the package manager used on the project.

example


This is a WIP project, and for now, there are only available the most used commands install, add, and remove, but we add other gradually (or by request).

So if you are in the same boat as me, or don’t want to relearn commands for each package manager, install swpm

npm install --global swpm
yarn global add swpm
pnpm install -global swpm
Enter fullscreen mode

Exit fullscreen mode

… and enjoy life.


Comments and contributions are welcome. I’m not an expert in node.js so I’m sure not following the best practices, but we are here to learn.

I hope this project does not finish as the XKCD story about standards. 😅

Image description


That’s All Folks!
Happy Coding 🖖

Buy me a cofee

What do you think?

Silver 1

Written by yulica

Leave a Reply

Your email address will not be published.

      S20:E3 — How to think like a CTO 🎙_628c0bebedefd.png

      S20:E3 — How to think like a CTO 🎙

      Benefits of multi-account strategy on AWS_628c0bc62f658.png

      Benefits of multi-account strategy on AWS