-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
43 lines (38 loc) · 959 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const gulp = require('gulp')
const webpack = require('webpack')
gulp.task('watch-scripts', () =>
gulp
.src(['./src/index.js', './src/sw.js'])
.pipe(
require('webpack-stream')({
watch: true,
config: require('./webpack.config.js').configs
})
)
.pipe(gulp.dest('www/Colorized'))
)
gulp.task('build-script', () => (
gulp
.src(['src/index.js', './src/sw.js'])
.pipe(
require('webpack-stream')({
config: require('./webpack.config.js').configs
})
)
.pipe(require('gulp-babel-minify')({}, {
comments: false
}))
.pipe(gulp.dest('docs'))
))
gulp.task('copy-icon', () =>
gulp
.src(['www/Colorized/icons/**'])
.pipe(gulp.dest('docs/icons'))
)
gulp.task('copy-to-docs', ['copy-icon'], () =>
gulp
.src(['www/Colorized/index.html'])
.pipe(gulp.dest('docs'))
)
gulp.task('build', ['build-script', 'copy-to-docs'])
gulp.task('watch', ['watch-scripts'])