From fed8fd4f3de6ef027b144f89a751fc9f7b571054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 21 Apr 2023 10:49:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=B0=83=20task=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E7=9A=84=E6=96=87=E5=AD=97=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 96bc0230..64663816 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,12 +15,12 @@ const yargs = require('yargs'); // 基础配置 const config = { - //注释 + // 注释 comment: [ '/** v<%= pkg.version %> | <%= pkg.license %> Licensed */<%= js %>' ,{pkg: pkg, js: ';'} ] - //模块 + // 模块 ,modules: 'lay,laytpl,laypage,laydate,jquery,layer,util,dropdown,slider,colorpicker,element,upload,form,table,treeTable,tree,transfer,carousel,rate,flow,code' }; @@ -49,7 +49,7 @@ const js = () => { ]; return gulp.src(src).pipe(uglify({ output: { - ascii_only: true //escape Unicode characters in strings and regexps + ascii_only: true // escape Unicode characters in strings and regexps }, ie: true })).pipe(concat('layui.js', {newLine: ''})) @@ -87,8 +87,8 @@ const cp = () => { // release const rls = () => { return gulp.src('./release/doc/**/*') - .pipe(replace(/[^'"]+(\/layui\.css)/, 'layui/css$1')) //替换 css 引入路径中的本地 path - .pipe(replace(/[^'"]+(\/layui\.js)/, 'layui$1')) //替换 js 引入路径中的本地 path + .pipe(replace(/[^'"]+(\/layui\.css)/, 'layui/css$1')) // 替换 css 引入路径中的本地 path + .pipe(replace(/[^'"]+(\/layui\.js)/, 'layui$1')) // 替换 js 引入路径中的本地 path .pipe(gulp.dest(dir.rls)); }; @@ -106,9 +106,9 @@ const cleanRLS = cb => { exports.js = js; exports.css = css; exports.files = files; -exports.default = gulp.series(clean, gulp.parallel(js, css, files)); //default task +exports.default = gulp.series(clean, gulp.parallel(js, css, files)); // default task exports.cp = gulp.series(clean, cp); -exports.rls = gulp.series(cleanRLS, rls); //release task +exports.rls = gulp.series(cleanRLS, rls); // release task // layer task exports.layer = () => { // gulp layer @@ -141,7 +141,7 @@ exports.laydate = () => { // gulp laydate .pipe(replace('}(window, window.document); //gulp build: lay-footer', '')) // 替换 lay.js 的落脚 .pipe(concat('laydate.js', {newLine: ''})) .pipe(replace(';!function(window, document){ //gulp build: laydate-header', '')) // 替换 laydate.js 的头部 - .pipe(header.apply(null, comment)) //追加头部 + .pipe(header.apply(null, comment)) // 追加头部 .pipe(gulp.dest(dest + 'src')); };