What command in the console to view a list of available scripts.

Suppose there is a section with scripts:

enter image description here

I used to type in npm ls или что то вроде этого - and I saw a list of scripts.

2 answers 2

In order to display a list of available scripts, you can use the command

 npm run 

npm run-script <command> [-- <args>...]

alias: npm run

Description


Runs the specified command and the "scripts" object in package.json. If "command" is not specified, a list of available scripts will be displayed.

    I use npm-list-scripts for this. You can install the command:

     npm install -g npm-list-scripts 

    The list of scripts can be viewed with the npm-list-scripts command.

    Work example: example