Say for example that I quite often use npm list -g -depth 0 as command, and I'd like to alias it with npm listC or npm list -c1.
How do I do that?
Say for example that I quite often use npm list -g -depth 0 as command, and I'd like to alias it with npm listC or npm list -c1.
How do I do that?
You can use npm scripts to create shortcuts for custom commands.
In your package.json you might have:
{
"scripts": {
"listC": "npm list -g depth 0"
}
}
And you could then run it with npm run listC.