generator-trybonsai
v0.6.1
Published
Bonsai official app generators
Maintainers
Readme
generator-trybonsai
Bonsai React component generator powered by Yeomaan
The trybonsai:component generator creates a React component directory with a Jest test file, Storybook story file and a simple Typescript base React component to speed up creating of new React components.
Installation
First, install Yeoman and generator-trybonsai using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-trybonsaiUsage
Generate a new React component folder:
yo trybonsai:component
# or specify a name directly:
yo trybonsai:component MyComponentThis will create a component directory at src/components/MyComponent with the following structure:
src/
components/
MyComponent/
index.ts
MyComponent.tsx
MyComponent.test.tsx
MyComponent.stories.tsxYou can optionally pass a path to place the component wherever you want:
yo trybonsai:component web/components/FooLicense
MIT © Bonsai, Inc.
