git ssb

0+

Rômulo Alves / website



Tree: b2d283111d6afc0f3d9231118e7e73b83a324226

Files: b2d283111d6afc0f3d9231118e7e73b83a324226 / gulpfile.js

721 bytesRaw
1const gulp = require('gulp');
2const minifyHtml = require('gulp-minify-html');
3const cleanCSS = require('gulp-clean-css');
4const usemin = require('gulp-usemin');
5const uglify = require('gulp-uglify');
6const rev = require('gulp-rev');
7
8gulp.task('copy', () =>
9 gulp.src(['src/favicon.png'])
10 .pipe(gulp.dest('dist/')));
11
12gulp.task('sw', () =>
13 gulp.src(['src/service-worker.js'])
14 .pipe(uglify())
15 .pipe(gulp.dest('dist/')));
16
17gulp.task('build', ['copy', 'sw'], function () {
18 return gulp.src('src/index.html')
19 .pipe(usemin({
20 css: [ rev() ],
21 js: [ uglify(), rev() ],
22 html: [ minifyHtml({ empty: true }) ],
23 inlinecss: [ cleanCSS, 'concat' ]
24 }))
25 .pipe(gulp.dest('dist/'));
26});
27

Built with git-ssb-web