module.exports = function(gulp, plugins) { var argv = require('yargs').argv, path = require('path'), svn = require('svn-push'), log = console.log; var that = this; that.message = argv.m || '初始化项目'; var pkg = require('../package.json'); var proj_namespace = [pkg.description, pkg.name, pkg.version+'/'].join('/') var config = require('../svnconfig.json') gulp.task('publish', function(){ svn({ message: that.message, username: config.svnUsr, password: config.svnPwd, trymkdir: true, pushIgnore: ['*.html', '.DS_Store', '.idea/**', '.tmp_svn/**', '.svn/**','assets/**'], src: 'dest', dest: 'http://svn.duowan.com:9999/svn/web/program/assets/' + proj_namespace, tmp: '.tmp_svn' }) }) }