@veams/bp-react-component

Blueprint templates for a react component.

Usage no npm install needed!

<script type="module">
  import veamsBpReactComponent from 'https://cdn.skypack.dev/@veams/bp-react-component';
</script>

README

Veams Blueprint - React Component (@veams/bp-react-component)

With this blueprint you can scaffold a react component with multiple options:

  1. Add a description for your component.
  2. Do you want import the SCSS file inline?

Setup

  1. First of all be sure you have installed veams-cli.
  2. After that be sure your project contains a veams-cli.json.
  3. Make sure you have updated veams-cli.json to fit the needs of your project.
  4. Install the package with npm i @veams/bp-react-container --save-dev.
  5. 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!