TIL npx
POSTED ON:
Around NPM 5.2, they released a cool feature called npx
This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via npm run.
For example:
The rimraf is a library for deleting files.
npx rimraf ./**/node_modules
That will do the following:
- Fetch the NPM servers remotely for
rimraf
binary. - Get the
rimraf
library and put it in NPM cache. - Run the binary like it was part of your project.
Related TILs
Tagged: npm