react-boss
v1.2.7
Published
A React component generation library
Downloads
33
Maintainers
Readme
Installation
Globally install react-boss
npm install -g react-boss
OR
yarn global add react-boss
Documentation
Help
To get a list of commands and usage hints use
react-boss --help
Creating a new React Application
react-boss init
Generating modules and components
Creating a module :
react-boss module
- The react-boss module requires a schema like below (schema.json).
- The react-boss module will create a CRUD module for you with validations as you defined in the schema.
{
"crud": {
"name": {
"type": "string",
"label": "Product Name",
"required": "true",
"placeholder": "Enter your product name",
"inputType": "text"
},
"price": {
"type": "number",
"label": "Price",
"required": "false",
"placeholder": "Enter your price",
"inputType": "number"
},
"category": {
"type": "string",
"label": "Category",
"required": "false",
"placeholder": "Enter your category",
"inputType": "text"
},
"img": {
"type": "string",
"label": "Image",
"required": "false",
"placeholder": "Enter your img url",
"inputType": "text"
}
},
"list": {
"name": { "width": "40%", "title": "Name" ,"key":"name"},
"price": { "width": "20%", "title": "price","key":"price" },
"category": { "width": "40%", "title": "Category","key":"category" },
"img": { "width": "40%", "title": "Image","key":"img" }
}
}
Creating a component: react-boss component