码迷,mamicode.com
首页 > Web开发 > 详细

[Node.js] Use "prestart" in scripts

时间:2016-03-15 00:18:51      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

Usually we run : 

npm start

to start an app, then we we might call other script to do something:

npm build && nodemon app

 

Actaully we can use "prestart" to simpify this, because npm will check if there is "prestart" script, if there is it will run prestart before start:

"prestart": "babel src --out-dir dist",
"start": "node dist/index.js"

 

[Node.js] Use "prestart" in scripts

标签:

原文地址:http://www.cnblogs.com/Answer1215/p/5277772.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!