I usually run gulp via npm, e.g. in my package.json
"scripts": {
"test": "gulp test",
"minify": "gulp minify"
}
Then I can run command such as
npm run minify
Which is okay, but every time I've new tasks in my gulpfile, I need to add them to the package.json under the scripts section, is there any better way to do so?
Reason: I only install npm globally to my path
so all other modules will not pollute my path
, so I need to run them via npm
scripts
npm run
instead of the normal way? This info could help to know what you really trying to achieve