perf(create): run async tasks concurrently (#8080)

* Adding incremental support for React 18 🚀

* parallel

* revert react 18

* revert lint

* end line

* Update packages/create-docusaurus/src/index.ts

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Sanjaiyan Parthipan 2022-09-11 08:36:34 +05:30 committed by GitHub
parent a0ab2b0065
commit 0a87116a1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,8 +456,10 @@ export default async function init(
reqTemplate?: string,
cliOptions: CLIOptions = {},
): Promise<void> {
const templates = await readTemplates();
const siteName = await getSiteName(reqName, rootDir);
const [templates, siteName] = await Promise.all([
readTemplates(),
getSiteName(reqName, rootDir),
]);
const dest = path.resolve(rootDir, siteName);
const source = await getSource(reqTemplate, templates, cliOptions);