用于异步功能的互斥锁
npm i async-await-lockimport 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 iStart the dev server,
$ npm startBuild documentation,
$ npm run docs:build