A better way to manage global npm command line tools.
I've always disked running
npm install -g create-react-appto have a command line tool. I also dislike
npx create-react-app because it downloads the dependencies every time. I can't keep track of it or lock down the version easily. Instead I have a project in my dotfiles which I add to my path.
~/.dotfiles directory I have a
node folder with a
package.json. Whenever I need a tool I install it to this project.
~/.zshrc I add
~/.dotfiles/node/node_modules/.bin to my
Now I can access these npm command line tools and keep them versioned.