码迷,mamicode.com
首页 > 其他好文 > 详细

devDependencies和dependencies区别

时间:2015-05-24 23:13:48      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:

package.json 中存在devDependencies和dependencies,那么他们的区别是什么呢?

devDependencies是开发中需要安装的包

dependencies是发布时需要安装的包

那么如果区分安装呢?

默认用 npm install 的时候他会安装devDependencies中的内容

如果用 npm install --production 就会安装dependencies中的内容

If you do npm config set production, then that sets the --production configuration flag for all npm commands, by setting production = true in the ~/.npmrc file.

If you do npm start --production, then it‘ll set the NODE_ENV=production environ for the start script.

If you do npm install --production then it won‘t install devDependencies locally.

devDependencies和dependencies区别

标签:

原文地址:http://www.cnblogs.com/zhongping/p/4526674.html

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