Contribution
Contribute to shuip to make it better.
Configuration
Installation
-
Clone the repository
git clone https://github.com/plvo/shuip.gitcd shuip -
Install dependencies
bun install -
Create a branch for your changes
git checkout -b feat/my-component -
Start the development server
bun run dev
Add a component
File structure
Each shuip component follows this structure:
โโโ registry/โ โโโ ui/โ โ โโโ my-component.tsx # Implementation of the componentโ โโโ examples/โ โโโ my-component.tsx # Base exampleโ โโโ my-component.with-state.tsx # Example with the title "With state"โ โโโ my-component.disabled.tsx # Example with the title "Disabled"โโโ docs/components/โ โโโ my-component.mdx # Documentation of the componentโโโ registry.json # Registry configuration
Detailed steps
- Create your component in
registry/ui/
- Create at least one example in
registry/examples/
(with the same name as the component file) - Generate and build the registry files
bun run registry:generate # Generates the registry/__index__.tsx filebun run registry:build # Generates the JSONs in public/r/*
- Create the component documentation in
content/components/
---title: My Componentdescription: Description of the componentgroup: shortcut---<ItemHeader filename={'my-component'} /># ...<ItemFooter itemName={'my-component'} props={[{name: 'label',type: 'string',description: 'The label of the component',},]} />
Submit your contribution
Create a Pull Request
git add .git commit -m "feat: new component my-component"git push origin feat/my-component
Thank you for your contribution to shuip! ๐