Skip to content

Conversation

@ieedan
Copy link

@ieedan ieedan commented Feb 21, 2025

Description

This PR adds jsrepo as a means to distribute components through the CLI.

You can view a preview the registry here: https://jsrepo.dev/registry?url=github/ieedan/tremor/tree/jsrepo#/

jsrepo automatically detects dependencies during build and then installs them when users add components through the CLI. Full documentation jsrepo.dev

Right now you build the registry with pnpm build:registry this can be setup with CI so that the registry stays up to date with your changes.

Currently the registry is just hosted on https://github.com the benefits of this are the ability to version through tags and not paying for any infra costs associated with serving files.

But this could easily be changed so that the registry is hosted on tremor.so.

You can test out the registry on my fork by running:

# initialize adding tailwind config and global css
jsrepo init github/ieedan/tremor/tree/jsrepo

# once configured

jsrepo add # add from list
jsrepo add components/Accordion # add specific component

# OR zero config

# add from list
jsrepo add --repo github/ieedan/tremor/tree/jsrepo

# add a specific component
jsrepo add github/ieedan/tremor/tree/jsrepo/components/Accordion

The final url could look something like:

github/tremorlabs/tremor # github hosted
https://tremor.so/ # self hosted

Related issue(s)

Would fix #115

What kind of change does this PR introduce? (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • New Feature (BREAKING CHANGE which adds functionality)
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

How has this been tested?

Screenshots (if appropriate):

The PR fulfils these requirements:

  • It's submitted to the main branch
  • Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.
  • My change requires a change to the documentation. (Managed by Tremor Team)
  • I have added tests to cover my changes
  • Check the "Allow edits from maintainers" option while creating your PR.
  • By contributing to Tremor, you confirm that you have read and agreed to Tremor's CONTRIBUTING.md guideline. You also agree that your contributions will be licensed under the Apache License 2.0 license.

Thanks for taking a look!

@vercel
Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tremor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 2:47pm

@ieedan ieedan changed the title feat: Add jsrepo feat: Add CLI Support (with jsrepo) Feb 21, 2025
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.

[Feature]: Add cli support

1 participant