That's perfectly normal.(那是完全正常的。)
If you want gulp-cli
available on the command line, you need to install it globally.(如果您希望在命令行上使用gulp-cli
,则需要全局安装它。)
npm install --global gulp-cli
See the install instruction .(请参阅安装说明 。)
Also, node_modules/.bin/
isn't in your $PATH
.(此外, node_modules/.bin/
不在$PATH
。)
But it is automatically added by npm when running npm scripts (see this blog post for reference ).(但是在运行npm脚本时它会被npm自动添加(请参阅此博客文章以供参考 )。)
So you could add scripts
to your package.json
file:(所以你可以在你的package.json
文件中添加scripts
:)
{
"name": "your-app",
"version": "0.0.1",
"scripts": {
"gulp": "gulp",
"minify": "gulp minify"
}
}
You could then run npm run gulp
or npm run minify
to launch gulp tasks.(然后你可以运行npm run gulp
或npm run minify
来启动gulp任务。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…