用于异步功能的互斥锁
npm i async-await-lock
import AsyncAwaitLock from 'async-await-lock';
const lock = new AsyncAwaitLock();
async function serialTask() {
await lock.acquire();
try {
// Don't return a promise here as Promise may resolve after finally
// has executed
} finally {
lock.unlock();
}
}
Install dependencies,
$ npm i
Start the dev server,
$ npm start
Build documentation,
$ npm run docs:build