Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: [create astro] add directory prompt #3168

Merged
merged 9 commits into from
Apr 21, 2022

Conversation

bholmesdev
Copy link
Contributor

Changes

  • Adds a directory question to the create-astro wizard if none is provided
  • Now defaults to ./my-astro-site to reduce confusion
  • Asks for new directory of selected dir is non-empty (inspired by Remix)
  • Asks for new directory if non-empty dir is supplied as CLI argument

Testing

  • Added select-directory test file
  • Finally added create-astro tests back to the turbo build 🔥
  • Marked old tests as "skipped," since refactoring seemed out of scope
  • Added mocha and chai to create-astro as dev deps

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2022

🦋 Changeset detected

Latest commit: 91a763e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-astro Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: create-astro Related to the `create-astro` package (scope) test labels Apr 21, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests! LGTM if everything is passing ✅

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bholmesdev bholmesdev merged commit 7c49194 into main Apr 21, 2022
@bholmesdev bholmesdev deleted the feat/create-astro-add-directory-prompt branch April 21, 2022 20:36
@github-actions github-actions bot mentioned this pull request Apr 21, 2022
mrienstra pushed a commit to mrienstra/astro that referenced this pull request Sep 14, 2022
For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same.

Search:
`\b(npm|yarn|pnpm) init astro\b`
Replace:
`$1 create astro`

Except for two instances:

1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog.

2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro#3168.
natemoo-re pushed a commit that referenced this pull request Sep 16, 2022
* .md only: npm init astro --> npm create astro

For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same.

Search:
`\b(npm|yarn|pnpm) init astro\b`
Replace:
`$1 create astro`

Except for two instances:

1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog.

2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in #3168.

* docs: add `@latest` to `npm create astro`
Co-authored-by: Bjorn Lu <bjorn@bjornlu.com>

Co-authored-by: Michael Rienstra <michael@goodmoney.com>
natemoo-re pushed a commit to natemoo-re/astro-template-minimal that referenced this pull request Sep 30, 2022
* .md only: npm init astro --> npm create astro

For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same.

Search:
`\b(npm|yarn|pnpm) init astro\b`
Replace:
`$1 create astro`

Except for two instances:

1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog.

2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro/astro#3168.

* docs: add `@latest` to `npm create astro`
Co-authored-by: Bjorn Lu <bjorn@bjornlu.com>

Co-authored-by: Michael Rienstra <michael@goodmoney.com>
mimed95 pushed a commit to mimed95/mimed95.github.io that referenced this pull request Apr 5, 2024
* .md only: npm init astro --> npm create astro

For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same.

Search:
`\b(npm|yarn|pnpm) init astro\b`
Replace:
`$1 create astro`

Except for two instances:

1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog.

2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro/astro#3168.

* docs: add `@latest` to `npm create astro`
Co-authored-by: Bjorn Lu <bjorn@bjornlu.com>

Co-authored-by: Michael Rienstra <michael@goodmoney.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants