1.0.1 • Published 1 year ago
sunbit-schematics v1.0.1
Sunbit Schematics
Schematics generators for React
Features
- Generates boilerplate according to Sunbit Guidelines.
- Supports Typescript.
Installation
npm:
npm install -g @angular-devkit/schematics-cli npm install -g --save-dev sunbit-schematics
yarn:
yarn global add @angular-devkit/schematics-cli yarn global add sunbit-schematics
Usage
schematics sunbit-schematics:<generator name> <arguments>
Available generators
Component
Creates a React component.
Example:
schematics sunbit-schematics:component myComponent --path={insert-path}
with alias:
schematics sunbit-schematics:c myComponent --path={insert-path}
Parameters
Type | Name | Description | Default |
---|---|---|---|
{string} required | name | The name of the component. | none |
{string} | path | The path to create the component | './' |
{boolean} | noTest | Specifies if a spec file is generated | true |
{boolean} | subfolder | Flag to indicate if a dir is created | true |
Container
Creates a React Container.
Example:
schematics sunbit-schematics:container myComponent --path={insert-path}
with alias:
schematics sunbit-schematics:cs myComponent --path={insert-path}
Parameters
Type | Name | Description | Default |
---|---|---|---|
{string} required | name | The name of the component. | none |
{string} | path | The path to create the component | './' |
{boolean} | withtest | Specifies if a spec file is generated | false |
{boolean} | subfolder | Flag to indicate if a dir is created | true |