Skip to content

Commit

Permalink
Merge pull request Tencent#514 from HakurouKen/master
Browse files Browse the repository at this point in the history
构建参数 alias
  • Loading branch information
bear authored Nov 17, 2016
2 parents d74823b + 2d35ed4 commit 6940c61
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

var path = require('path');
var fs = require('fs');
var yargs = require('yargs').argv;
var gulp = require('gulp');
var less = require('gulp-less');
var header = require('gulp-header');
Expand All @@ -13,6 +12,21 @@ var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync');
var pkg = require('./package.json');
var yargs = require('yargs')
.options({
'w': {
alias: 'watch',
type: 'boolean'
},
's': {
alias: 'server',
type: 'boolean'
},
'p': {
alias: 'port',
type: 'number'
}
}).argv;

var option = {base: 'src'};
var dist = __dirname + '/dist';
Expand Down Expand Up @@ -124,4 +138,4 @@ gulp.task('default', ['release'], function () {
if (yargs.w) {
gulp.start('watch');
}
});
});

0 comments on commit 6940c61

Please sign in to comment.