build(gulp): append new line at end of JS files

This commit is contained in:
Cotes Chung
2022-10-15 21:28:25 +08:00
parent d9d7848f03
commit 916fbf4a2c
8 changed files with 8 additions and 7 deletions

View File

@@ -24,6 +24,7 @@ function minifyJs() {
return src(`${ JS_DEST }/*.js`)
.pipe(insert.prepend(fs.readFileSync(`${ JS_SRC }/copyright`, 'utf8')))
.pipe(uglify({output: {comments: /^!|@preserve|@license|@cc_on/i}}))
.pipe(insert.append('\n'))
.pipe(dest(JS_DEST));
}