feat(build): delete dist before building

This commit is contained in:
Julien Fontanet 2016-06-26 17:47:56 +02:00
parent ebdc6376d8
commit 64cbe3d209
2 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,7 @@ var gulp = require('gulp')
var babel = require('gulp-babel')
var coffee = require('gulp-coffee')
var plumber = require('gulp-plumber')
var rimraf = require('rimraf')
var sourceMaps = require('gulp-sourcemaps')
var watch = require('gulp-watch')
@ -38,6 +39,10 @@ function src (patterns) {
// ===================================================================
gulp.task(function clean (cb) {
rimraf(DIST_DIR, cb)
})
gulp.task(function buildCoffee () {
return src('**/*.coffee')
.pipe(sourceMaps.init())
@ -62,4 +67,4 @@ gulp.task(function buildEs6 () {
// ===================================================================
gulp.task('build', gulp.parallel('buildCoffee', 'buildEs6'))
gulp.task('build', gulp.series('clean', gulp.parallel('buildCoffee', 'buildEs6')))

View File

@ -122,6 +122,7 @@
"mocha": "^2.2.1",
"must": "^0.13.1",
"nyc": "^6.4.2",
"rimraf": "^2.5.2",
"sinon": "^1.14.1",
"standard": "^7.0.0"
},