[英]Open bash and run command on npm start
When I start my app, I do it by running npm start
. 启动我的应用程序时,我可以通过运行npm start
。 Right now, npm start
only runs my server.js
. 现在, npm start
只运行我的server.js
。 Is it possible to have npm start
open a new bash prompt and run eg grunt watch
to start the task that watches my less/stylus etc? 是否有可能让npm start
打开一个新的bash提示并运行例如grunt watch
来启动grunt watch
我的less / stylus等的任务?
It would be nice to not have to manually start the watch
task each time. 不必每次都手动启动watch
任务会很好。
Simply specify a custom start script: 只需指定一个自定义启动脚本:
"scripts": {
"start": "node server.js & grunt watch"
}
https://www.npmjs.org/doc/misc/npm-scripts.html https://www.npmjs.org/doc/misc/npm-scripts.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.