feat: CLI support #7
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey came across this project on daily.dev and thought it was pretty cool!
For the past few months I have been working on a project called jsrepo. It makes distributing your components from the CLI really nice for project owners and users.
This PR integrates jsrepo into stunning-ui to allow you to distribute your (beautiful) components from the CLI.
You can demo the CLI using my fork:
You can also preview the registry through the jsrepo website here
With this implementation components would be served directly from github but you could also set it up where the registry is built to the public folder as a static asset and served via the stunning-ui website something like:
jsrepo automatically figures out the dependencies of each of your components and ensures that they are included in the registry so that you don't accidentally break your users. All of this is done with the
jsrepo buildcommand. This command outputs thejsrepo-manifest.jsonfile which allows the CLI to locate the components and their dependencies.I added a script in the package.json so that you can build the registry with:
This way you can automatically build your registry when you make changes by setting up a github action. Here's an example of what that looks like: https://jsrepo.dev/docs/git-providers/github#CI%20/%20CD
Thanks for taking a look!