Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-01-28 10:45:13 +09:00
committed by GitHub
parent 8232ea6956
commit 6250af2a2c
5 changed files with 33 additions and 29 deletions

View File

@@ -23,10 +23,14 @@ const options = {
sourcemap: 'linked',
};
// js-built配下をすべて削除する
fs.rmSync('./js-built', { recursive: true, force: true });
const args = process.argv.slice(2).map(arg => arg.toLowerCase());
if (process.argv.map(arg => arg.toLowerCase()).includes('--watch')) {
// js-built配下をすべて削除する
if (!args.includes('--no-clean')) {
fs.rmSync('./js-built', { recursive: true, force: true });
}
if (args.includes('--watch')) {
await watchSrc();
} else {
await buildSrc();