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

Add a verbose flag to create-astro #2429

Merged
merged 7 commits into from
Jan 21, 2022
Merged

Add a verbose flag to create-astro #2429

merged 7 commits into from
Jan 21, 2022

Conversation

Mikkel-T
Copy link
Contributor

Changes

  • This adds an option to create-astro to use verbose logging which should help debug degit issues (And others as well)

Testing

Docs

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2022

🦋 Changeset detected

Latest commit: d1053fd

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 Patch

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 the pkg: create-astro Related to the `create-astro` package (scope) label Jan 20, 2022
@netlify
Copy link

netlify bot commented Jan 20, 2022

✔️ Deploy Preview for astro-docs-2 ready!

🔨 Explore the source changes: 5e98dc1

🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/61e9740c8861360007326cdf

😎 Browse the preview: https://deploy-preview-2429--astro-docs-2.netlify.app

Copy link
Contributor

@boehs boehs left a comment

Choose a reason for hiding this comment

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

Great work, this will surely come in handy for all the WSL users 😉

packages/create-astro/src/index.ts Show resolved Hide resolved
const extractedLocale = process.env.LANG.split('.')[0].replace(/_/g, '-');
// Check if language code is atleast two characters long (ie. en, es).
// NOTE: if "c" locale is encountered, the default locale will be returned.
if (extractedLocale.length < 2) return defaultLocale;

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not really sure, this code is just a straight copy of the logger implemented in astro core but with some parts removed that didn't seem necessary for create-astro, but I don't think that it would return anything like that, I am not very familiar with env variables though so I don't actually know.

Copy link
Contributor

Choose a reason for hiding this comment

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

awesome

packages/create-astro/src/logger.ts Outdated Show resolved Hide resolved
packages/create-astro/src/logger.ts Outdated Show resolved Hide resolved
Mikkel-T and others added 2 commits January 20, 2022 20:25
Make if statement easier to read

Co-authored-by: Evan Boehs <evan@boehs.org>
@jonathantneal jonathantneal merged commit fda857e into withastro:main Jan 21, 2022
@github-actions github-actions bot mentioned this pull request Jan 21, 2022
@Mikkel-T Mikkel-T deleted the create-astro-verbose branch January 21, 2022 06:55
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