Which Package Manager should I choose?

telco2011

David (ダビッド )

Posted on February 10, 2020

Which Package Manager should I choose?

Original Post

Package Manager is the backbone in every TypeScript/NodeJS project. There are several options to choose but, because of its popularity, npm, yarn or pnpm are the candidates.

In my experience, I have been switching between npm and yarn. The first choice was npm. It was the first package manager in the NodeJS ecosystem and it was the obligatory step if you started to do things with NodeJS.

Later, when yarn came to the playground, I changed to try it because I had read different articles with good impressions and I have to say it was mine as well.

After some time, and some npm improvements, I came back to npm, not without testing pnpm briefly before but, with not a good taste. At the beginning of this year, the yarn team released the version 2 but, unlike my previous try, this time I continued using npm, I am happy with it and it is not needed any package manager change in my projects.

I have made my decision and I have chosen npm but not everyone is choosing npm and if you want to share your projects with others developers, I think it is a good practice try not to force anybody to use your package manager selection so, I started to search some way to create projects with an agnostic package manager and I came across with npm-run-all library.

This library is able to run your run-scripts in different ways (serial, parallel) with no package manager indications, I mean, you can use npm, yarn or your favorite package manager with no worries about the other scripts execution.

Our Axiosfit library is using it and I encourage you to try it as well.

If you want to see a more complex sample, also you can check our TypeScript Full Stack project.

Enjoy!! 🌳

'INFO' Although it is true that there are some other tools like Gulp or Grunt to customize your run tasks, I like to be independent and only use my package manager scripts.

💖 💪 🙅 🚩
telco2011
David (ダビッド )

Posted on February 10, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Which Package Manager should I choose?
productivity Which Package Manager should I choose?

February 10, 2020