In this lesson we will look at different ways you can list the available npm scripts. Whether we want to pipe npm run
through less
or install an npm package such as completion
or ntl
, we have many options to quickly execute scripts with shell tab completion.
1. Install 'ntl':
npm i -g ntl
Then run:
ntl
It will list all the command line for you to use.
2. Using npm complection:
npm completion >> ~/.bashrc //or npm completion >> ~/.zshrc
Then run:
npm run // press tab key
Then it will list all the available scripts.