From d7df5f031ed02e63fc37577fec9d9b496cc05d7b 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, 20 Dec 2024 16:17:04 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BC=98=E5=8C=96=20vs=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20(#2405)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c0b6b211..e3b7ce20 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -26,17 +26,17 @@ const config = { // 获取参数 const argv = minimist(process.argv.slice(2), { default: { - version: pkg.version + vs: pkg.version } }); -const rlsFileName = `${pkg.name}-v${pkg.version}`; // 发行文件名 +const rlsFileName = `${pkg.name}-v${argv.vs}`; // 发行文件名 const rlsDest = `./release/zip/${rlsFileName}/${pkg.name}`; // 发行目标路径 const rlsDirname = path.dirname(rlsDest); // 发行目录名 // 复制目标路径 const copyDest = argv.dest - ? path.join(argv.dest, (argv.vs ? '/' + pkg.version : '')) + ? path.join(argv.dest, (argv.vs ? '/' + argv.vs : '')) : rlsDest; // 打包目标路径 @@ -150,6 +150,6 @@ exports.help = () => { ' default 默认任务', ' release 发行任务', ' cp 将 dist 目录复制一份到参数 --dest 指向的目录' - ].join('\n'), '\n\nExamples:\n gulp cp --dest ./v --vs', '\n'); + ].join('\n'), '\n\nExamples:\n gulp cp --dest ./v', '\n'); return gulp.src('./'); };