Veams Blueprint - React Component (@veams/bp-react-component
)
With this blueprint you can scaffold a react component with multiple options:
- Add a description for your component.
- Do you want import the SCSS file inline?
Setup
- First of all be sure you have installed
veams-cli
. - After that be sure your project contains a
veams-cli.json
. - Make sure you have updated
veams-cli.json
to fit the needs of your project. - Install the package with
npm i @veams/bp-react-container --save-dev
. - Reference the package in
veams-cli.json
by adding component
to the blueprint
object like so:
{
"blueprints": {
"component": {
"skipImports": true,
"path": "node_modules/@veams/bp-react-component"
}
}
}
Usage
Now you can use this blueprint with veams
by executing:
veams generate component teaser
The output in your file system will be:
└── src
└── shared
└── components
└── teaser
└── teaser.jsx
└── teaser.scss
└── teaser.story.jsx
Have fun!