Skip to content

Commit

Permalink
[create-astro] Execute the 'git' step as the final interaction (#6314)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
MilesPernicious authored Feb 21, 2023
1 parent d0dbee8 commit 7f61e8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/great-colts-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Prompt for git initialization last, so all configurations can get added to the initial commit
12 changes: 11 additions & 1 deletion packages/create-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ export async function main() {
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) {
await step(ctx);
Expand Down

0 comments on commit 7f61e8f

Please sign in to comment.