Browse Source

Enhancement/html min (#61)

* add template generator

* add html minification
pull/63/head
Cian Butler 4 years ago
committed by GitHub
parent
commit
04204b5ac0
3 changed files with 4124 additions and 1 deletions
  1. +6
    -1
      gulpfile.js
  2. +1
    -0
      package.json
  3. +4117
    -0
      yarn.lock

+ 6
- 1
gulpfile.js View File

@@ -8,6 +8,7 @@ const connect = require('gulp-connect');
const jsonSchema = require('gulp-json-schema');
const babel = require('gulp-babel');
const shell = require('gulp-shell')
const htmlmin = require('gulp-htmlmin');

gulp.task('dev', ['webserver'], function () {
gulp.watch(['./css/*.scss', './js/*.js', './**/*.handlebars', './**/*.json'], ['scss', 'compress', 'generate', 'html']);
@@ -63,4 +64,8 @@ gulp.task('validate', function() {

gulp.task('generate', ['validate'], shell.task("node bin/generate.js"));

gulp.task('default', ['generate', 'compress', 'scss', 'fonts']);
gulp.task('default', ['generate', 'compress', 'scss', 'fonts'], function () {
return gulp.src('dist/**/*.html')
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(gulp.dest('dist'));
});

+ 1
- 0
package.json View File

@@ -29,6 +29,7 @@
"gulp-clean-css": "^2.0.12",
"gulp-concat": "^2.6.0",
"gulp-connect": "^5.0.0",
"gulp-htmlmin": "^3.0.0",
"gulp-json-schema": "^1.0.0",
"gulp-minify": "0.0.14",
"gulp-rename": "^1.2.2",


+ 4117
- 0
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save