1.2.0 • Published 3 years ago
@biglemonco/plop-templates v1.2.0
@biglemonco/plop-templates
Installation
- First install it:
yarn add @biglemonco/plop-templates
- Then in your
plopfile.ts
:
import { NodePlopAPI } from 'plop';
export default (plop: NodePlopAPI) => {
plop.load('@biglemonco/plop-templates');
};
- Add plop to your
package.json
{
"scripts": {
"plop": "plop"
}
}
Generator commands
This comes with a few commands to create different component types:
Command | Description | Options |
---|---|---|
plop screen | Creates a container and component and for a screen | --name "string" (component name)--datasource "none" or "apollo" or "datastore" |
plop view | Creates a container and component for view | --name "string" (component name)--uiLibrary "none" or "antd"--uiComponent "none" or "table"--datasource "none" or "apollo" or "datastore" |
plop layout | Creates a layout with storybook | --name "string" (component name)--uiLibrary "none" or "antd"--uiComponent "none" or "table" |
plop component | Creates a component | --name "string" (component name) |
plop lambda | Adds typescript to an existing Lambda function | --name "string" (Lambda function name)--directory "string" (Lambda directory)--functionType "resolver" or "trigger" |