From 3a47bd402cc290d2ec800380e81270498562ee5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 14 Nov 2016 22:33:29 +0100 Subject: [PATCH] Update filesystem builder script removing unnecessary dependencies and changing default target --- code/gulpfile.js | 23 +---------------------- code/package.json | 6 +----- code/pio_hooks.py | 2 +- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/code/gulpfile.js b/code/gulpfile.js index 77056eca..58ca9ee9 100644 --- a/code/gulpfile.js +++ b/code/gulpfile.js @@ -24,14 +24,11 @@ along with this program. If not, see . // ----------------------------------------------------------------------------- const gulp = require('gulp'); -const plumber = require('gulp-plumber'); const htmlmin = require('gulp-htmlmin'); const cleancss = require('gulp-clean-css'); const uglify = require('gulp-uglify'); const gzip = require('gulp-gzip'); const del = require('del'); -const useref = require('gulp-useref'); -const gulpif = require('gulp-if'); const inline = require('gulp-inline'); /* Clean destination folder */ @@ -69,24 +66,6 @@ gulp.task('inline', function() { .pipe(gulp.dest('data')); }) -/* Process HTML, CSS, JS */ -gulp.task('html', function() { - return gulp.src('html/*.html') - .pipe(useref()) - .pipe(plumber()) - .pipe(gulpif('*.css', cleancss())) - .pipe(gulpif('*.js', uglify())) - .pipe(gulpif('*.html', htmlmin({ - collapseWhitespace: true, - removeComments: true, - minifyCSS: true, - minifyJS: true - }))) - .pipe(gzip()) - .pipe(gulp.dest('data')); -}); - /* Build file system */ -gulp.task('buildfs', ['clean', 'files', 'html']); -gulp.task('buildfs2', ['clean', 'files', 'inline']); +gulp.task('buildfs', ['clean', 'files', 'inline']); gulp.task('default', ['buildfs']); diff --git a/code/package.json b/code/package.json index c31f55be..6ce9b531 100644 --- a/code/package.json +++ b/code/package.json @@ -11,12 +11,8 @@ "gulp-clean-css": "^2.0.10", "gulp-gzip": "^1.4.0", "gulp-htmlmin": "^2.0.0", - "gulp-if": "^2.0.1", "gulp-inline": "^0.1.1", - "gulp-plumber": "^1.1.0", - "gulp-uglify": "^1.5.3", - "gulp-useref": "^3.1.2", - "yargs": "^5.0.0" + "gulp-uglify": "^1.5.3" }, "dependencies": {} } diff --git a/code/pio_hooks.py b/code/pio_hooks.py index 593fb6f7..9a3f7fec 100644 --- a/code/pio_hooks.py +++ b/code/pio_hooks.py @@ -13,7 +13,7 @@ def is_valid_ip(ip): return False def before_build_spiffs(source, target, env): - env.Execute("gulp buildfs2") + env.Execute("gulp buildfs") def before_upload(source, target, env): upload_port = env.get('UPLOAD_PORT', False)