react-demo-tab-cli
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

React DemoTab CLI 📑

npm version CI oclif semantic-release prettier TypeScript

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

DemoTab example

Usage 🚀

To create demos out of React components:

  1. Name files as [component_name].demotab.jsx
  2. 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!

Package Sidebar

Install

npm i react-demo-tab-cli

Weekly Downloads

16

Version

1.3.2

License

MIT

Unpacked Size

21.2 kB

Total Files

32

Last publish

Collaborators

  • marko424