create-astro 4.2.0 → 4.2.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/README.md CHANGED
@@ -47,13 +47,16 @@ May be provided in place of prompts
47
47
 
48
48
  | Name | Description |
49
49
  | :--------------------------- | :----------------------------------------------------- |
50
+ | `--help` (`-h`) | Display available flags. |
50
51
  | `--template <name>` | Specify your template. |
51
52
  | `--install` / `--no-install` | Install dependencies (or not). |
52
53
  | `--git` / `--no-git` | Initialize git repo (or not). |
53
- | `--yes` (`-y`) | Skip all prompt by accepting defaults. |
54
- | `--no` (`-n`) | Skip all prompt by declining defaults. |
54
+ | `--yes` (`-y`) | Skip all prompts by accepting defaults. |
55
+ | `--no` (`-n`) | Skip all prompts by declining defaults. |
55
56
  | `--dry-run` | Walk through steps without executing. |
56
57
  | `--skip-houston` | Skip Houston animation. |
58
+ | `--ref` | Specify an Astro branch (default: latest). |
59
+ | `--fancy` | Enable full Unicode support for Windows. |
57
60
  | `--typescript <option>` | TypeScript option: `strict` / `strictest` / `relaxed`. |
58
61
 
59
62
  [examples]: https://github.com/withastro/astro/tree/main/examples
package/dist/index.js CHANGED
@@ -384,7 +384,7 @@ function printHelp({
384
384
  if (headline) {
385
385
  message.push(
386
386
  linebreak(),
387
- `${title(commandName)} ${color.green(`v${"4.2.0"}`)} ${headline}`
387
+ `${title(commandName)} ${color.green(`v${"4.2.1"}`)} ${headline}`
388
388
  );
389
389
  }
390
390
  if (usage) {
@@ -612,12 +612,12 @@ function help() {
612
612
  ["--template <name>", "Specify your template."],
613
613
  ["--install / --no-install", "Install dependencies (or not)."],
614
614
  ["--git / --no-git", "Initialize git repo (or not)."],
615
- ["--yes (-y)", "Skip all prompt by accepting defaults."],
616
- ["--no (-n)", "Skip all prompt by declining defaults."],
615
+ ["--yes (-y)", "Skip all prompts by accepting defaults."],
616
+ ["--no (-n)", "Skip all prompts by declining defaults."],
617
617
  ["--dry-run", "Walk through steps without executing."],
618
618
  ["--skip-houston", "Skip Houston animation."],
619
619
  ["--ref", "Choose astro branch (default: latest)."],
620
- ["--fancy", "Enable full unicode support for Windows."],
620
+ ["--fancy", "Enable full Unicode support for Windows."],
621
621
  ["--typescript <option>", "TypeScript option: strict | strictest | relaxed."]
622
622
  ]
623
623
  }
@@ -780,10 +780,11 @@ import { downloadTemplate } from "giget";
780
780
  import fs4 from "node:fs";
781
781
  import path5 from "node:path";
782
782
  async function template(ctx) {
783
- if (ctx.yes) {
783
+ if (!ctx.template && ctx.yes)
784
784
  ctx.template = "basics";
785
+ if (ctx.template) {
785
786
  await info("tmpl", `Using ${color6.reset(ctx.template)}${color6.dim(" as project template")}`);
786
- } else if (!ctx.template) {
787
+ } else {
787
788
  const { template: tmpl } = await ctx.prompt({
788
789
  name: "template",
789
790
  type: "select",
@@ -797,8 +798,6 @@ async function template(ctx) {
797
798
  ]
798
799
  });
799
800
  ctx.template = tmpl;
800
- } else {
801
- await info("tmpl", `Using ${color6.reset(ctx.template)}${color6.dim(" as project template")}`);
802
801
  }
803
802
  if (ctx.dryRun) {
804
803
  await info("--dry-run", `Skipping template copying`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",