1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-30 11:32:40 +00:00

Improve code style

- js/css
- markdown
- shell
This commit is contained in:
Cotes Chung
2021-01-27 20:06:31 +08:00
parent d8a42d9bb4
commit 8e84c6b9d6
14 changed files with 961 additions and 917 deletions

View File

@@ -12,7 +12,6 @@ const fs = require('fs');
const JS_ROOT = './assets/js';
const jsDest = `${ JS_ROOT }/dist/`;
const copyrightPath = `${ JS_ROOT }/.copyright`;
function concatJs(files, output) {
return src(files)
@@ -23,7 +22,7 @@ function concatJs(files, output) {
function minifyJs() {
return src(`${ jsDest }/*.js`)
.pipe(insert.prepend(fs.readFileSync(copyrightPath, 'utf8')))
.pipe(insert.prepend(fs.readFileSync(`${ JS_ROOT }/.copyright`, 'utf8')))
.pipe(uglify({output: {comments: /^!|@preserve|@license|@cc_on/i}}))
.pipe(dest(jsDest));
}