Fix relaxed and default TypeScript settings not working (#4183)

* Fix relaxed and default TypeScript settings not working

* Create itchy-hats-exist.md
This commit is contained in:
Erika 2022-08-06 10:04:39 -04:00 committed by GitHub
parent 4e4061f485
commit 77c018e515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 8 deletions

View file

@ -0,0 +1,5 @@
---
"create-astro": patch
---
Fix relaxed and default TypeScript settings not working

View file

@ -343,14 +343,16 @@ export async function main() {
if (args.dryRun) {
ora().info(dim(`--dry-run enabled, skipping.`));
} else if (tsResponse.typescript) {
fs.copyFileSync(
path.join(
url.fileURLToPath(new URL('..', import.meta.url)),
'tsconfigs',
`tsconfig.${tsResponse.typescript}.json`
),
path.join(cwd, 'tsconfig.json')
);
if (tsResponse.typescript !== 'default') {
fs.copyFileSync(
path.join(
url.fileURLToPath(new URL('..', import.meta.url)),
'tsconfigs',
`tsconfig.${tsResponse.typescript}.json`
),
path.join(cwd, 'tsconfig.json')
);
}
ora().succeed('TypeScript settings applied!');
}