create-astro 5.1.0 → 5.2.0
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 +1 -0
- package/dist/actions/context.d.ts +1 -0
- package/dist/index.js +15 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ May be provided in place of prompts
|
|
|
52
52
|
| `--install` / `--no-install` | Install dependencies (or not). |
|
|
53
53
|
| `--add <integrations>` | Add integrations. |
|
|
54
54
|
| `--git` / `--no-git` | Initialize git repo (or not). |
|
|
55
|
+
| `--no-ai` | Skip creating AI agent files. |
|
|
55
56
|
| `--yes` (`-y`) | Skip all prompts by accepting defaults. |
|
|
56
57
|
| `--no` (`-n`) | Skip all prompts by declining defaults. |
|
|
57
58
|
| `--dry-run` | Walk through steps without executing. |
|
package/dist/index.js
CHANGED
|
@@ -470,7 +470,7 @@ function printHelp({
|
|
|
470
470
|
if (headline) {
|
|
471
471
|
message.push(
|
|
472
472
|
linebreak(),
|
|
473
|
-
`${title(commandName)} ${color.green(`v${"5.
|
|
473
|
+
`${title(commandName)} ${color.green(`v${"5.2.0"}`)} ${headline}`
|
|
474
474
|
);
|
|
475
475
|
}
|
|
476
476
|
if (usage) {
|
|
@@ -518,6 +518,7 @@ async function getContext(argv) {
|
|
|
518
518
|
"--no-install": Boolean,
|
|
519
519
|
"--git": Boolean,
|
|
520
520
|
"--no-git": Boolean,
|
|
521
|
+
"--no-ai": Boolean,
|
|
521
522
|
"--skip-houston": Boolean,
|
|
522
523
|
"--dry-run": Boolean,
|
|
523
524
|
"--help": Boolean,
|
|
@@ -540,6 +541,7 @@ async function getContext(argv) {
|
|
|
540
541
|
"--no-install": noInstall,
|
|
541
542
|
"--git": git2,
|
|
542
543
|
"--no-git": noGit,
|
|
544
|
+
"--no-ai": noAI,
|
|
543
545
|
"--fancy": fancy,
|
|
544
546
|
"--skip-houston": skipHouston,
|
|
545
547
|
"--dry-run": dryRun,
|
|
@@ -569,7 +571,7 @@ async function getContext(argv) {
|
|
|
569
571
|
packageManager,
|
|
570
572
|
"astro",
|
|
571
573
|
getPackageTag(packageSpecifier),
|
|
572
|
-
"7.0.
|
|
574
|
+
"7.0.3"
|
|
573
575
|
),
|
|
574
576
|
skipHouston,
|
|
575
577
|
fancy,
|
|
@@ -584,6 +586,7 @@ async function getContext(argv) {
|
|
|
584
586
|
yes,
|
|
585
587
|
install: install2 ?? (noInstall ? false : void 0),
|
|
586
588
|
git: git2 ?? (noGit ? false : void 0),
|
|
589
|
+
ai: noAI ? false : true,
|
|
587
590
|
cwd,
|
|
588
591
|
exit(code) {
|
|
589
592
|
process.exit(code);
|
|
@@ -768,15 +771,17 @@ async function copyTemplate(tmpl, ctx) {
|
|
|
768
771
|
}
|
|
769
772
|
throw new Error(`Unable to download template ${color2.reset(tmpl)}`);
|
|
770
773
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
fs.symlinkSync("AGENTS.md", claudePath);
|
|
776
|
-
} catch {
|
|
774
|
+
if (ctx.ai) {
|
|
775
|
+
const agentsPath = path.resolve(ctx.cwd, "AGENTS.md");
|
|
776
|
+
const claudePath = path.resolve(ctx.cwd, "CLAUDE.md");
|
|
777
|
+
fs.writeFileSync(agentsPath, generateAgentsMd());
|
|
777
778
|
try {
|
|
778
|
-
fs.
|
|
779
|
+
fs.symlinkSync("AGENTS.md", claudePath);
|
|
779
780
|
} catch {
|
|
781
|
+
try {
|
|
782
|
+
fs.linkSync(agentsPath, claudePath);
|
|
783
|
+
} catch {
|
|
784
|
+
}
|
|
780
785
|
}
|
|
781
786
|
}
|
|
782
787
|
const removeFiles = FILES_TO_REMOVE.map(async (file) => {
|
|
@@ -957,6 +962,7 @@ function help() {
|
|
|
957
962
|
["--install / --no-install", "Install dependencies (or not)."],
|
|
958
963
|
["--add <integrations>", "Add integrations."],
|
|
959
964
|
["--git / --no-git", "Initialize git repo (or not)."],
|
|
965
|
+
["--no-ai", "Skip creating AI agent files."],
|
|
960
966
|
["--yes (-y)", "Skip all prompts by accepting defaults."],
|
|
961
967
|
["--no (-n)", "Skip all prompts by declining defaults."],
|
|
962
968
|
["--dry-run", "Walk through steps without executing."],
|