From 6af38aad874c549d9ec46bd533ebfe1cfe06a7b2 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 31 May 2023 15:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D--no-clean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 7 +++---- package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index c2a6ed0..1096cb2 100755 --- a/index.js +++ b/index.js @@ -22,10 +22,8 @@ const NODE_VERSION = process.versions.node.split('.').map(n => +n) let args = process.argv.slice(2) let mode = args.shift() || 'prod' -let clean, verbose -args = args.join(' ') -clean = args.includes('--no-clean') // -verbose = args.includes('--verbose') // +let clean = !args.includes('--no-clean') // +let verbose = args.includes('--verbose') // if (NODE_VERSION[0] < 16 || (NODE_VERSION[0] === 16 && NODE_VERSION[1] < 6)) { console.log(red('Error: 你当前的环境不满足 fite 构建工具的要求')) @@ -58,6 +56,7 @@ switch (mode) { .then(function (conf) { let dist = conf.buildDir || 'dist' if (clean && fs.isdir(dist)) { + console.log('清除dist目录...') fs.rm(dist) } compile(WORK_SPACE, dist, conf.default, verbose) diff --git a/package.json b/package.json index 554ee43..6ef8006 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fite", "type": "module", - "version": "1.1.7", + "version": "1.1.8", "bin": { "fite": "index.js" },