From ee206aff49565a04e3753cf07dcf1787b0dc5850 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Fri, 21 Oct 2016 22:29:31 +0200 Subject: Add Gulp + Journal + sane CSS + complete Rewrite + Piwik etc etc etc. --- gulpfile.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gulpfile.js (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..fd95942 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,30 @@ +var gulp = require('gulp'); +var cssnano = require('gulp-cssnano'); +var htmlmin = require('gulp-htmlmin'); +var uncss = require('gulp-uncss'); + +gulp.task('default', function() { + // place code for your default task here + return gulp.src('static/concat.css') + .pipe(uncss({ + html: ['layouts/*.html', 'layouts/partials/*.html', 'layouts/_default/*.html'] + })) + .pipe(cssnano()) + .pipe(gulp.dest('./static/gulp.css')); +}); + +gulp.task('minifyhtml', function() { + gulp.src('public/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/')); + gulp.src('public/projects/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/projects/')); + gulp.src('public/journal/*/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/journal/')); + return gulp.src('public/journal/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/journal/')); +}); + -- cgit v1.2.3