You’re in your terminal and want to use
npm run to run one of the scripts for the Node.js project you’re working on. The only problem is you can’t quite remember the script name.
Instead of digging inside the
package.json for the script name, you can list all the run scripts available for a Node.js project from the command line by executing
npm run without a command. I find this a super handy way to avoid context switching and disrupting the flow of what I’m doing in the terminal.