簡體   English   中英

打開bash並在npm start上運行命令

[英]Open bash and run command on npm start

啟動我的應用程序時,我可以通過運行npm start 現在, npm start只運行我的server.js 是否有可能讓npm start打開一個新的bash提示並運行例如grunt watch來啟動grunt watch我的less / stylus等的任務?

不必每次都手動啟動watch任務會很好。

只需指定一個自定義啟動腳本:

"scripts": {
    "start": "node server.js & grunt watch"
}

https://www.npmjs.org/doc/misc/npm-scripts.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM