Which Package Manager should I choose?
Beginners

Which Package Manager should I choose?

Which Package Manager should I choose when I want to develop using javascript?

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. 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.

mysticatea/npm-run-all
A CLI tool to run multiple npm-scripts in parallel or sequential. - mysticatea/npm-run-all

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.

yggdrasilts/axiosfit
Axiosfit is a project inspired by Retrofit to create declarative HTTP clients using axios as the http client for browsers and nodejs, all the TypeScript features and RxJS to manage the requests usi...

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.

Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to YggdrasilTS
Great! Next, complete checkout for full access to YggdrasilTS
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.