Skip to content

Commit

Permalink
Merge branch 'main' into node_version_bump
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoco committed Mar 26, 2024
2 parents a3939c4 + 7424fe1 commit cd3c048
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,18 +322,22 @@ export async function init(options: Options): Promise<boolean> {
generatedPackageJson = true;
}

const addedDeps = await addDependencies(packageJson, options);
const addedScripts = await addScripts(packageJson, options);
const [addedDeps, addedScripts] = await Promise.all([
addDependencies(packageJson, options),
addScripts(packageJson, options),
]);
if (generatedPackageJson || addedDeps || addedScripts) {
await writePackageJson(packageJson, options);
} else {
options.logger.log('No edits needed in package.json.');
}
await generateTsConfig(options);
await generateESLintConfig(options);
await generateESLintIgnore(options);
await generatePrettierConfig(options);
await generateEditorConfig(options);
await Promise.all([
generateTsConfig(options),
generateESLintConfig(options),
generateESLintIgnore(options),
generatePrettierConfig(options),
generateEditorConfig(options),
]);
await installDefaultTemplate(options);

// Run `npm install` after initial setup so `npm run lint` works right away.
Expand Down

0 comments on commit cd3c048

Please sign in to comment.