mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 10:42:31 +02:00
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:
parent
a0ab2b0065
commit
0a87116a1c
1 changed files with 4 additions and 2 deletions
|
@ -456,8 +456,10 @@ export default async function init(
|
||||||
reqTemplate?: string,
|
reqTemplate?: string,
|
||||||
cliOptions: CLIOptions = {},
|
cliOptions: CLIOptions = {},
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const templates = await readTemplates();
|
const [templates, siteName] = await Promise.all([
|
||||||
const siteName = await getSiteName(reqName, rootDir);
|
readTemplates(),
|
||||||
|
getSiteName(reqName, rootDir),
|
||||||
|
]);
|
||||||
const dest = path.resolve(rootDir, siteName);
|
const dest = path.resolve(rootDir, siteName);
|
||||||
const source = await getSource(reqTemplate, templates, cliOptions);
|
const source = await getSource(reqTemplate, templates, cliOptions);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue