git ssb

0+

Rômulo Alves / website



Tree: 756ea9b64e891d165a78679421a9a401979fe59d

Files: 756ea9b64e891d165a78679421a9a401979fe59d / 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