ims*_*eth 5 gitignore npm angularjs bower gulp
我使用gulp,bower,stylus为angularjs应用程序.
我没有使用任何Continuous Integration技术,git pull从回购荷兰国际集团代码时手动git push都是为了master分支上bitbucket,考虑到这样的场景:
bower.json,package.json和
gulpfile.js在生产服务器上,并通过手动安装依赖npm install或bower install服务器上? gulpfile.js在服务器上是否安全?此外,如果使用任何Continuous Integration技术,最佳做法是什么?
我的.gitignore文件如下:
node_modules
dist
.tmp
.sass-cache
bower_components
private.xml
nbproject
gruntfile.js
gulpfile.js
package.json
Run Code Online (Sandbox Code Playgroud)
添加package.json和bower.json文件以跟踪生产服务器上使用的依赖项.但是,您应该跳过上传gulp或grunt文件,因为它们仅供本地使用.它们不需要上传到生产服务器上.
编辑:如果您使用grunt/gulp重新启动节点服务器,例如使用grunt/gulp中的nodemon,您可以上传grunt/gulp文件.最后,如果您正确构建了节点服务器,那么将grunt/gulp文件放在服务器上是没有害的,因为这些文件会在服务器启动之前与您的系统进行交互.
| 归档时间: |
|
| 查看次数: |
1408 次 |
| 最近记录: |