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:
parent
4e4061f485
commit
77c018e515
2 changed files with 15 additions and 8 deletions
5
.changeset/itchy-hats-exist.md
Normal file
5
.changeset/itchy-hats-exist.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"create-astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix relaxed and default TypeScript settings not working
|
|
@ -343,14 +343,16 @@ export async function main() {
|
||||||
if (args.dryRun) {
|
if (args.dryRun) {
|
||||||
ora().info(dim(`--dry-run enabled, skipping.`));
|
ora().info(dim(`--dry-run enabled, skipping.`));
|
||||||
} else if (tsResponse.typescript) {
|
} else if (tsResponse.typescript) {
|
||||||
fs.copyFileSync(
|
if (tsResponse.typescript !== 'default') {
|
||||||
path.join(
|
fs.copyFileSync(
|
||||||
url.fileURLToPath(new URL('..', import.meta.url)),
|
path.join(
|
||||||
'tsconfigs',
|
url.fileURLToPath(new URL('..', import.meta.url)),
|
||||||
`tsconfig.${tsResponse.typescript}.json`
|
'tsconfigs',
|
||||||
),
|
`tsconfig.${tsResponse.typescript}.json`
|
||||||
path.join(cwd, 'tsconfig.json')
|
),
|
||||||
);
|
path.join(cwd, 'tsconfig.json')
|
||||||
|
);
|
||||||
|
}
|
||||||
ora().succeed('TypeScript settings applied!');
|
ora().succeed('TypeScript settings applied!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue