Skip to content

Commit

Permalink
Merge branch 'main' into deps_eslint_node_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoco authored Mar 22, 2024
2 parents ab328ad + 7424fe1 commit 5ffffe4
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 5ffffe4

Please sign in to comment.