react-demo-tab-cli
v1.3.2
Published
CLI tool for creating demos of React components
Downloads
23
Maintainers
Readme
React DemoTab CLI 📑
Easily create demos of React components
Maintaining example code and demo separately makes it painful, it's easy to get them out of sync 🙅
Code can't lie, documentation can 💥
DemoTab CLI keeps your code up to date with demo 💪
Install
npm install -D react-demo-tab react-demo-tab-cli
Demo
Usage 🚀
To create demos out of React components:
- Name files as
[component_name].demotab.jsx
- Run
$ npx react-demo-tab-cli generate
Use created demos 🎉
Generated Demos
- By default generated demo files will be prefixed with
_
for example:MyComponent.demotab.jsx
→_MyComponent.jsx
- You can set custom prefix with
--prefix
flag:$ demotab generate --prefix=CustomPrefix
Built with DemoTab
Manually create demos
To manually create demos instead via CLI just React DemoTab component.
Contributing
All contributions are welcome!