[create-astro] Execute the 'git' step as the final interaction (#6314)
* [create-astro] Execute the 'git' step as the final interaction This ensures the initialized repository has all configuration changes commited in the first commit * Add changeset
This commit is contained in:
parent
d0dbee872f
commit
7f61e8fe36
2 changed files with 16 additions and 1 deletions
5
.changeset/great-colts-accept.md
Normal file
5
.changeset/great-colts-accept.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'create-astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Prompt for git initialization last, so all configurations can get added to the initial commit
|
|
@ -29,7 +29,17 @@ export async function main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const steps = [intro, projectName, template, dependencies, git, typescript, next];
|
const steps = [
|
||||||
|
intro,
|
||||||
|
projectName,
|
||||||
|
template,
|
||||||
|
dependencies,
|
||||||
|
typescript,
|
||||||
|
|
||||||
|
// Steps which write to files need to go above git
|
||||||
|
git,
|
||||||
|
next
|
||||||
|
];
|
||||||
|
|
||||||
for (const step of steps) {
|
for (const step of steps) {
|
||||||
await step(ctx);
|
await step(ctx);
|
||||||
|
|
Loading…
Reference in a new issue