diff options
| author | Horus3 | 2016-10-21 22:29:31 +0200 |
|---|---|---|
| committer | Horus3 | 2016-10-21 22:29:31 +0200 |
| commit | ee206aff49565a04e3753cf07dcf1787b0dc5850 (patch) | |
| tree | cc214e72ddfd4d56b6313eb8c07f6a12a851ee20 /gulpfile.js | |
| parent | b5777504850c99c0aa74e15516598de2da41e40d (diff) | |
| download | iamfabulous.de-ee206aff49565a04e3753cf07dcf1787b0dc5850.tar.gz | |
Add Gulp + Journal + sane CSS + complete Rewrite + Piwik etc etc etc.
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/')); +}); + |
