gulpfile-publish.js 809 B

1234567891011121314151617181920212223242526
  1. module.exports = function(gulp, plugins) {
  2. var argv = require('yargs').argv,
  3. path = require('path'),
  4. svn = require('svn-push'),
  5. log = console.log;
  6. var that = this;
  7. that.message = argv.m || '初始化项目';
  8. var pkg = require('../package.json');
  9. var proj_namespace = path.join(pkg.description, pkg.name, pkg.version, '/');
  10. gulp.task('publish', function(){
  11. svn({
  12. message: that.message,
  13. username: 'dw_liudawei',
  14. password: 'dw_liudawei',
  15. trymkdir: true,
  16. pushIgnore: ['*.html', '.DS_Store', '.idea/**', '.tmp_svn/**', '.svn/**'],
  17. src: 'dest',
  18. dest: 'http://svn.duowan.com:9999/svn/web/program/assets/' + proj_namespace,
  19. tmp: '.tmp_svn'
  20. })
  21. })
  22. }