mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 05:41:20 -08:00
refactor: remove redundant comments and improve code clarity in build scripts
This commit is contained in:
1 parent
e8b01c357f
commit
eccea444b0
2 files changed
+5
-9
No files matched your search
@@ -21,7 +21,6 @@ async function buildI18n() {
|
||||
}
|
||||
fs.mkdirSync(distDir, { recursive: true })
|
||||
|
||||
// --- 1. 构建 global(.js) 到临时目录 ---
|
||||
const distJs = path.join(distDir, 'cjs')
|
||||
const bundlerJs = new Parcel({
|
||||
entries,
|
||||
@@ -39,7 +38,6 @@ async function buildI18n() {
|
||||
await bundlerJs.run()
|
||||
console.log('✅ Built i18n global (.js)')
|
||||
|
||||
// --- 2. 构建 esmodule(.mjs) 到临时目录 ---
|
||||
const distMjs = path.join(distDir, 'esm')
|
||||
const bundlerMjs = new Parcel({
|
||||
entries,
|
||||
@@ -66,7 +64,6 @@ async function buildI18n() {
|
||||
}
|
||||
console.log('✅ Built i18n esm (.mjs)')
|
||||
|
||||
// --- 3. 合并两个目录到 dist/i18n ---
|
||||
for (const f of fs.readdirSync(distJs)) {
|
||||
fs.renameSync(path.join(distJs, f), path.join(distDir, f))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user