clean before build
This commit is contained in:
parent
bf482fc6a9
commit
49201f539a
@ -7,11 +7,16 @@ var nsp = require('gulp-nsp');
|
||||
var babel = require('gulp-babel');
|
||||
var watch = require('gulp-watch');
|
||||
var batch = require('gulp-batch');
|
||||
var rimraf = require('rimraf');
|
||||
|
||||
// Initialize the babel transpiler so ES2015 files gets compiled
|
||||
// when they're loaded
|
||||
require('babel-core/register');
|
||||
|
||||
gulp.task('clean', function(cb) {
|
||||
rimraf('./dist', cb);
|
||||
});
|
||||
|
||||
gulp.task('static', function() {
|
||||
return gulp.src('**/*.js')
|
||||
.pipe(excludeGitignore())
|
||||
@ -29,7 +34,7 @@ gulp.task('test', function() {
|
||||
.pipe(mocha({reporter: 'spec'}));
|
||||
});
|
||||
|
||||
gulp.task('babel', function() {
|
||||
gulp.task('babel', ['clean'], function() {
|
||||
return gulp.src('lib/**/*.js')
|
||||
.pipe(babel())
|
||||
.pipe(gulp.dest('dist'));
|
||||
|
@ -43,6 +43,7 @@
|
||||
"gulp-mocha": "^2.0.0",
|
||||
"gulp-nsp": "^0.4.5",
|
||||
"gulp-watch": "^4.3.4",
|
||||
"lodash": "^3.0.0"
|
||||
"lodash": "^3.0.0",
|
||||
"rimraf": "^2.4.2"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user