aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js35
1 files changed, 21 insertions, 14 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 0bb7f86..2fc8d42 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,18 +1,20 @@
'use strict';
-var gulp = require('gulp');
-var browserSync = require('browser-sync');
-var uglify = require('gulp-uglify');
-var zip = require('gulp-vinyl-zip').zip;
-var size = require('gulp-size');
-var runSequence = require('run-sequence');
-let rollup = require('rollup-stream');
-
-var source = require('vinyl-source-stream');
-var libs = ['./node_modules/kontra/kontra.min.js', './node_modules/tinymusic/dist/TinyMusic.min.js'];
-var devLibs = ['./node_modules/jsfxr/jsfxr.js'];
-var libFolder = 'libs/';
-var outputTemp = 'temp/';
+const gulp = require('gulp');
+const browserSync = require('browser-sync');
+const uglify = require('gulp-uglify');
+const zip = require('gulp-vinyl-zip').zip;
+const size = require('gulp-size');
+const runSequence = require('run-sequence');
+const rollup = require('rollup-stream');
+const del = require('del');
+
+
+const source = require('vinyl-source-stream');
+const libs = ['./node_modules/kontra/kontra.min.js', './node_modules/tinymusic/dist/TinyMusic.min.js'];
+const devLibs = ['./node_modules/jsfxr/jsfxr.js'];
+const libFolder = 'libs/';
+const outputTemp = 'temp/';
gulp.task('serve', ['copylibs', 'copylibsDev', 'uglyfy_copy'], function () {
browserSync.init({
@@ -32,6 +34,11 @@ gulp.task('reload', function () {
browserSync.reload();
});
+gulp.task('delete_folders', function(){
+ return del(['libs/','public/','temp/','dist/']).then(function(paths){
+ console.log('Deleted Files & folders ',paths);
+ });
+});
gulp.task('uglyfy_copy', function () {
return rollup({
@@ -74,5 +81,5 @@ gulp.task('prepare_dist_folder', function () {
});
gulp.task('release', function () {
- runSequence('copylibs', 'copylibsDev', 'uglyfy_copy', 'prepare_dist_folder', 'zipFiles');
+ runSequence('delete_folders','copylibs', 'copylibsDev', 'uglyfy_copy', 'prepare_dist_folder', 'zipFiles');
});