Easily list all scripts in your
package.json
Locally:
$ npm install scripts-list
Globally:
$ npm install -g scripts-list
Update your package.json
to include it as a script:
{
...,
"scripts": {
"tasks": "npx scripts-list",
"dev": "nodemon src/index.js",
...
}
}
Optionally add descriptions for your scripts:
{
...,
"scriptsList": {
"dev": "Start the development server",
...
}
}
Argument | Type | Default | Options | Description |
---|---|---|---|---|
--format | String | json |
json, list |
Control the output format |
--color | Boolean | false |
true, false |
Use colors in output |
--indent | Boolean | String | \t |
true, false or custom string, e.g. ' ' |
Default JSON
scripts-list
List format with colors & custom indent
scripts-list --format list --color --indent=' '