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: Add --no-deps flag to init command #1199

Merged
merged 11 commits into from
Jul 20, 2024

Conversation

ieedan
Copy link
Contributor

@ieedan ieedan commented Jul 20, 2024

New Init:

Usage: shadcn-svelte init [options]

initialize your project and install dependencies

Options:
  -c, --cwd <cwd>            the working directory. defaults to the current directory.
  --nodeps                   disable adding & installing dependencies (advanced) (default: false)
  --style <name>             the style for the components (choices: "default", "new-york")
  --base-color <name>        the base color for the components (choices: "slate", "gray", "zinc", "neutral", "stone")
  --css <path>               path to the global CSS file
  --tailwind-config <path>   path to the tailwind config file
  --components-alias <path>  import alias for components
  --utils-alias <path>       import alias for utils
  -h, --help                 display help for command

Copy link

changeset-bot bot commented Jul 20, 2024

🦋 Changeset detected

Latest commit: ddf7163

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

This PR includes changesets to release 1 package
Name Type
shadcn-svelte 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

Copy link
Contributor

github-actions bot commented Jul 20, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
shadcn-svelte ✅ Ready (View Log) Visit Preview ddf7163

@AdrianGonz97 AdrianGonz97 changed the title feat: Add --nodeps flag to init command feat: Add --no-deps flag to init command Jul 20, 2024
Copy link
Collaborator

@AdrianGonz97 AdrianGonz97 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I've gone ahead and made some adjustments to the name of the flag and removed the manual install instructions as they're already part of the manual install docs. I also made a couple of cosmetic changes as well so that things can look a bit more uniform.

@AdrianGonz97 AdrianGonz97 merged commit b6b4601 into huntabyte:main Jul 20, 2024
4 checks passed
@ieedan ieedan deleted the nodep-flag-for-init branch July 20, 2024 21:10
@ieedan
Copy link
Contributor Author

ieedan commented Jul 20, 2024

Sorry about that didn't realize it was already there.

Ig valibot is smart enough to parse --no-deps into deps or is options cutting it short? It is working I was just curious.

Thanks for working on this!

@AdrianGonz97
Copy link
Collaborator

AdrianGonz97 commented Jul 20, 2024

Ig valibot is smart enough to parse --no-deps into deps or is options cutting it short? It is working I was just curious.

It's actually Commander that has this special handling when it parses --no-* flags. It chops out the no and sets it to true by default when the flag is not included. I was quite surprised by this too

@ieedan
Copy link
Contributor Author

ieedan commented Jul 20, 2024

Oh okay nice I'll have to keep that in mind helps remove a bunch of !no from your code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: --nodep or similar flag for init CLI command
2 participants