create-astro 2.0.0-beta.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -265,7 +265,7 @@ ${bold(
|
|
|
265
265
|
ora().warn(dim('--typescript <choice> missing. Defaulting to "strict"'));
|
|
266
266
|
args.typescript = "strict";
|
|
267
267
|
}
|
|
268
|
-
|
|
268
|
+
let tsResponse = args.typescript || (await prompts(
|
|
269
269
|
{
|
|
270
270
|
type: "select",
|
|
271
271
|
name: "typescript",
|
|
@@ -290,7 +290,7 @@ ${bold(
|
|
|
290
290
|
)).typescript;
|
|
291
291
|
if (tsResponse === "unsure") {
|
|
292
292
|
await typescriptByDefault();
|
|
293
|
-
tsResponse
|
|
293
|
+
tsResponse = "base";
|
|
294
294
|
}
|
|
295
295
|
if (args.dryRun) {
|
|
296
296
|
ora().info(dim(`--dry-run enabled, skipping.`));
|
|
@@ -300,14 +300,14 @@ ${bold(
|
|
|
300
300
|
if (err && err.code === "ENOENT") {
|
|
301
301
|
fs.writeFileSync(
|
|
302
302
|
templateTSConfigPath,
|
|
303
|
-
stringify({ extends: `astro/tsconfigs/${tsResponse}` }, null, 2)
|
|
303
|
+
stringify({ extends: `astro/tsconfigs/${tsResponse ?? "base"}` }, null, 2)
|
|
304
304
|
);
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
307
|
const templateTSConfig = parse(data.toString());
|
|
308
308
|
if (templateTSConfig && typeof templateTSConfig === "object") {
|
|
309
309
|
const result = assign(templateTSConfig, {
|
|
310
|
-
extends: `astro/tsconfigs/${tsResponse
|
|
310
|
+
extends: `astro/tsconfigs/${tsResponse ?? "base"}`
|
|
311
311
|
});
|
|
312
312
|
fs.writeFileSync(templateTSConfigPath, stringify(result, null, 2));
|
|
313
313
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-astro",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "withastro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/prompts": "^2.0.14",
|
|
43
43
|
"@types/which-pm-runs": "^1.0.0",
|
|
44
44
|
"@types/yargs-parser": "^21.0.0",
|
|
45
|
-
"astro-scripts": "0.0.10
|
|
45
|
+
"astro-scripts": "0.0.10",
|
|
46
46
|
"chai": "^4.3.6",
|
|
47
47
|
"mocha": "^9.2.2",
|
|
48
48
|
"uvu": "^0.5.3"
|