Skip to content

Commit

Permalink
perf(create): run async tasks concurrently (#8080)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and slorber committed Oct 28, 2022
1 parent f387099 commit 5e072f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/create-docusaurus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5e072f0

Please sign in to comment.