diff options
Diffstat (limited to 'gulpfile.js')
| -rw-r--r-- | gulpfile.js | 30 |
1 files changed, 30 insertions, 0 deletions
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/')); +}); + |
