forked from haxtheweb/haxcms-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
42 lines (42 loc) · 1.27 KB
/
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
const gulp = require('gulp');
const terser = require('gulp-terser');
gulp.task(
"default", async () => {
// not sure why but polymer isn't picked up unless we do this
await gulp.src('./build/es6/node_modules/@polymer/polymer/**/*.js')
.pipe(terser({
keep_fnames: true,
mangle: false,
compress: true,
module: true
}))
.pipe(gulp.dest('./build/es6/node_modules/@polymer/polymer/'));
// now work on all the other files
await gulp.src('./build/es6/**/*.js')
.pipe(terser({
keep_fnames: true,
mangle: false,
compress: true,
module: true
}))
.pipe(gulp.dest('./build/es6/'));
// not sure why but polymer isn't picked up unless we do this
await gulp.src('./build/es6-amd/node_modules/@polymer/polymer/**/*.js')
.pipe(terser({
keep_fnames: true,
mangle: false,
compress: true,
module: true
}))
.pipe(gulp.dest('./build/es6-amd/node_modules/@polymer/polymer/'));
// now work on all the other files
return await gulp.src('./build/es6-amd/**/*.js')
.pipe(terser({
keep_fnames: true,
mangle: false,
compress: true,
module: true
}))
.pipe(gulp.dest('./build/es6-amd/'));
}
);