在共享的Debian开发环境中为多个用户安装npm install,gulp和bower

时间:2014-07-28 12:46:43

标签: node.js debian npm gulp multi-user

我有几个开发人员使用的开发人员serverdebian),每个开发人员都拥有自己的个人资料用户ssh访问权限vhost

我希望允许他们使用npm installgulpbower作为他们的项目,但我不知道如何干净利落地安装这些工具。

最佳做法是什么?

1 个答案:

答案 0 :(得分:0)

如果您只是想立即创建环境,postinstall中的{p> package.json非常有用。

{
  "scripts": {
    "postinstall": "bower install && gulp build"
  },
  "devDependencies": {
    ...
  }
}

使用gulpfile.js,如下所示。

var gulp        = require('gulp');
var runSequence = require('run-sequence');

gulp.task('build',  function(){ return runSequence('clean', ['html', 'coffee', 'css']); });
gulp.task('clean',  function(){ ... );
gulp.task('html',   function(){ ... );
gulp.task('coffee', function(){ ... );
gulp.task('css',    function(){ ... );

然后$ npm install也会运行bowergulp