diff --git a/gulpfile.coffee b/gulpfile.coffee index 79fb493..7663af8 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -27,14 +27,17 @@ gulp.task 'copy:manifest', -> .pipe gulp.dest('dist') gulp.task 'copy:images', -> + del.sync 'dist/images' gulp.src 'src/images/*' .pipe gulp.dest('dist/images') gulp.task 'copy:vendor', -> + del.sync 'dist/vendor' gulp.src 'vendor/**/*' .pipe gulp.dest('dist/vendor') gulp.task 'haml', -> + del.sync 'dist/html' gulp.src 'src/haml/*.haml' .pipe plumber errorHandler: notify.onError('Error: <%= error.message %>') @@ -62,6 +65,7 @@ gulp.task 'coffee:popup', -> .pipe gulp.dest('dist/javascripts') gulp.task 'sass', -> + del.sync 'dist/stylesheets' gulp.src 'src/sass/*.sass' .pipe plumber errorHandler: notify.onError("Error: <%= error.message %>") @@ -69,13 +73,7 @@ gulp.task 'sass', -> indentedSyntax: true .pipe gulp.dest('dist/stylesheets') -gulp.task 'build', ['clean'], -> - gulp.start 'copy:manifest' - gulp.start 'copy:images' - gulp.start 'copy:vendor' - gulp.start 'haml' - gulp.start 'coffee' - gulp.start 'sass' +gulp.task 'build', ['copy:manifest', 'copy:images', 'copy:vendor', 'haml', 'coffee', 'sass'] gulp.task 'watch', -> gulp.watch 'src/manifest.json', ['copy:manifest'] diff --git a/wercker.yml b/wercker.yml index fa9f914..8ab0f85 100644 --- a/wercker.yml +++ b/wercker.yml @@ -12,7 +12,7 @@ build: echo "npm version $(npm -v) running" - script: name: create dist - code: npm run zip + code: npm run zip && test -e dist-$(npm run app_version --silent).zip deploy: steps: - script: