I'm a manager with a knack for empathetic communication and emotional intelligence. I strive to lead by example and follow the principles of positive leadership.
Thanks for sharing! I was excited when npx came out but it turns out that I went a different way: All the packages I need for a project are references in the dependencies in package.json. That way, you don't need to worry about installing something globally at all. I also find it safer to make my projects as self contained as possible. What do you think? Any cons to my method?
I think this is a good way to install the packages, actually is the right way in my opinion. I think npx is more to try packages, and to use with cli, so we don't need to install every time someone wants to see your project.
I'm a manager with a knack for empathetic communication and emotional intelligence. I strive to lead by example and follow the principles of positive leadership.
Ah, that's right! Once I install the dependency, I write an npm script to run it and if it does not work for me I just remove the dependency and the script. I can see how npx would make it easier for me, as I wouldn't have to use that npm script intermediary when I'm figuring out how the package works. Nice.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for sharing! I was excited when
npx
came out but it turns out that I went a different way: All the packages I need for a project are references in the dependencies inpackage.json
. That way, you don't need to worry about installing something globally at all. I also find it safer to make my projects as self contained as possible. What do you think? Any cons to my method?I think this is a good way to install the packages, actually is the right way in my opinion. I think npx is more to try packages, and to use with cli, so we don't need to install every time someone wants to see your project.
Ah, that's right! Once I install the dependency, I write an
npm
script to run it and if it does not work for me I just remove the dependency and the script. I can see hownpx
would make it easier for me, as I wouldn't have to use thatnpm
script intermediary when I'm figuring out how the package works. Nice.