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

build(dependencies): move 'tailwindcss-animate' to devDependencies #5772

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Jacksonmills
Copy link
Contributor

Converted 'tailwindcss-animate' from a regular dependency to a devDependency across style configurations. This optimizes production builds by excluding development-related assets, enhancing performance and reducing bundle size. No functional dependencies are affected by this change.

Addresses: #5197

Converted 'tailwindcss-animate' from a regular dependency to a devDependency across style configurations. This optimizes production builds by excluding development-related assets, enhancing performance and reducing bundle size. No functional dependencies are affected by this change.
Copy link

vercel bot commented Nov 8, 2024

@Jacksonmills is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Jacksonmills
Copy link
Contributor Author

@shadcn I need some guidance on running the /packages/shadcn local cli so that I can test my changes.

I seem to have it running with pnpm --filter=shadcn-ui dev, however I am unsure how to access it in local projects, I tried linking globally but it said there were no binaries in the dir

@smithgeek
Copy link

@Jacksonmills What worked for me was running pnpm build to build the cli, then npm link to link globally and then run npx shadcn wherever you want to test it.

@Jacksonmills
Copy link
Contributor Author

@Jacksonmills What worked for me was running pnpm build to build the cli, then npm link to link globally and then run npx shadcn wherever you want to test it.

Okay thanks I'll try that!

@Jacksonmills
Copy link
Contributor Author

@smithgeek got it working ty!

Reorganize JSON files to distinctly separate "devDependencies" from regular dependencies for clarity and accuracy. Adjust the build script to reflect these changes, ensuring that dev dependencies like "tailwindcss-animate" are distinctly included in the build process. This modification resolves discrepancies in the generated registry files, improving maintainability and adhering to updated project practices.
Moved "tailwindcss-animate" from regular dependencies to devDependencies to ensure that build-specific animations do not bloat the production bundle unnecessarily. This separation helps streamline production builds and maintain cleaner dependency management.
Enhanced the `updateDependencies` function to handle devDependencies separately from regular dependencies. This improvement allows for the specific installation of development dependencies using the appropriate package manager flags, ensuring better package management and environment consistency.
@Jacksonmills
Copy link
Contributor Author

@shadcn am I missing or doing something wrong here?

I seem to always get "tailwindcss-animate" in deps when I test shadcn:dev locally

Thanks

@shadcn
Copy link
Collaborator

shadcn commented Nov 11, 2024

@Jacksonmills I'll take a look.

Re. running the cli locally. Here's my workflow:

  • pnpm www:dev to run the registry (main site).
  • pnpm shadcn:dev to run the dev script for the cli.
  • In another tab, pnpm shadcn to test the cli.

eg. pnpm shadcn -c ~/Desktop/my-app to test the cli in my-app locally.

  • To run the tests, pnpm --filter=shadcn test

@shadcn shadcn self-assigned this Nov 11, 2024
@Jacksonmills
Copy link
Contributor Author

Jacksonmills commented Nov 11, 2024

@Jacksonmills I'll take a look.

Re. running the cli locally. Here's my workflow:

* `pnpm www:dev` to run the registry (main site).

* `pnpm shadcn:dev` to run the dev script for the cli.

* In another tab, `pnpm shadcn` to test the cli.

eg. pnpm shadcn -c ~/Desktop/my-app to test the cli in my-app locally.

* To run the tests, `pnpm --filter=shadcn test`

ahh could be I was not running the local www for the updated registry... will test later

that did it! tyty

@Jacksonmills
Copy link
Contributor Author

@shadcn LMK if I need to change anything else, thanks again for the help!

@Jacksonmills
Copy link
Contributor Author

Jacksonmills commented Nov 11, 2024

Also @smithgeek check out shacn's workflow, seems like the best way to test in full

Maybe worth updating the contribution readme with this for others that might be a bit confused on running it all

I misunderstood but make sure to run this with an actual command from shadcn

e.g. pnpm shadcn <init | add | etc> -c ~/Desktop/my-app

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.

3 participants