Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit 039685f

Browse files
committed
highlight http request
1 parent 64b526b commit 039685f

File tree

5 files changed

+3819
-243
lines changed

5 files changed

+3819
-243
lines changed

gulp.d/tasks/build.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ const postcssVar = require('postcss-custom-properties')
1818
const { Transform } = require('stream')
1919
const map = (transform) => new Transform({ objectMode: true, transform })
2020
const through = () => map((file, enc, next) => next(null, file))
21-
const uglify = require('gulp-uglify')
21+
const terser = require('gulp-terser')
22+
const terserConfig = { keep_fnames: true, mangle: false }
2223
const vfs = require('vinyl-fs')
2324

2425
module.exports = (src, dest, preview) => () => {
@@ -59,7 +60,7 @@ module.exports = (src, dest, preview) => () => {
5960
return merge(
6061
vfs
6162
.src('js/+([0-9])-*.js', { ...opts, sourcemaps })
62-
.pipe(uglify())
63+
.pipe(terser(terserConfig))
6364
// NOTE concat already uses stat from newest combined file
6465
.pipe(concat('js/site.js')),
6566
vfs
@@ -93,7 +94,7 @@ module.exports = (src, dest, preview) => () => {
9394
})
9495
)
9596
.pipe(buffer())
96-
.pipe(uglify()),
97+
.pipe(terser(terserConfig)),
9798
// NOTE use this statement to bundle a JavaScript library that cannot be browserified, like jQuery
9899
//vfs.src(require.resolve('<package-name-or-require-path>'), opts).pipe(concat('js/vendor/<library-name>.js')),
99100
vfs

0 commit comments

Comments
 (0)