Files: eaabead8a17ab34cf7a0a2045511a03d8ff3e74e / gulpfile.js
714 bytesRaw
1 | var gulp = require('gulp'); |
2 | var minifyHtml = require('gulp-minify-html'); |
3 | var cleanCSS = require('gulp-clean-css'); |
4 | var usemin = require('gulp-usemin'); |
5 | var rev = require('gulp-rev'); |
6 | var ghPages = require('gulp-gh-pages'); |
7 | |
8 | var ghPagesConfig = { |
9 | branch: 'master' |
10 | }; |
11 | |
12 | gulp.task('build', function () { |
13 | return gulp.src('src/index.html') |
14 | .pipe(usemin({ |
15 | css: [ rev() ], |
16 | html: [ minifyHtml({ empty: true }) ], |
17 | inlinecss: [ cleanCSS, 'concat' ] |
18 | })) |
19 | .pipe(gulp.dest('dist/')); |
20 | }); |
21 | |
22 | gulp.task('publish', function() { |
23 | return gulp.src('./dist/**/*') |
24 | .pipe(ghPages({ |
25 | branch: 'master' |
26 | })); |
27 | }); |
28 | |
29 | gulp.task('deploy', ['build'], function () { |
30 | return gulp.start('publish'); |
31 | }); |
Built with git-ssb-web