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 次 |
最近记录: |