Skip to content

Commit

Permalink
Fix relaxed and default TypeScript settings not working (#4183)
Browse files Browse the repository at this point in the history
* Fix relaxed and default TypeScript settings not working

* Create itchy-hats-exist.md
  • Loading branch information
Princesseuh committed Aug 6, 2022
1 parent 4e4061f commit 77c018e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-hats-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-astro": patch
---

Fix relaxed and default TypeScript settings not working
18 changes: 10 additions & 8 deletions packages/create-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
}

Expand Down

0 comments on commit 77c018e

Please sign in to comment.