mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 15:56:15 -08:00
refactor(tooling): [MOD-02] split library build and development into typed modules
This commit is contained in:
1 parent
28c7abb2bb
commit
401d4cdd65
36 files changed
+1644
-427
No files matched your search
+1
-16
@@ -1,16 +1 @@
|
||||
export function createRebuildQueue(build) {
|
||||
let pending = false
|
||||
let active
|
||||
return () => {
|
||||
pending = true
|
||||
if (!active) {
|
||||
active = Promise.resolve().then(async () => {
|
||||
while (pending) {
|
||||
pending = false
|
||||
await build()
|
||||
}
|
||||
}).finally(() => { active = undefined })
|
||||
}
|
||||
return active
|
||||
}
|
||||
}
|
||||
export { createRebuildQueue } from './library/rebuild.ts'
|
||||
Reference in new issue
Block a user