ng-gempe v0.0.1
Gempe CLI
Gempe CLI, a CLI to easily create an angular component with Gempe patterns. 🚀
With this cli we Gempers can build more easily the angular components with the gempe patterns
For 🔪💀 Devs!
How Use? 🤔
- Install cli with
npm i -g gempe
- Run
gempe g
orgempe generate
- Select a componetent type
- Select a component's name
- Select the module path to which your component belongs (dont need add 'src/app')
- Enter the required options
- 👨💻
Form Component
To use Form Component you must be provide a file .json with form configurations, like this
// My .json file
[
{
"name": "field name",
"type": "form type",
"validators": [
{
"required": true
},
{
"minLength": 10
}
]
}
]
Name : It's the name of your field
Type
: It's the typeof your field, can be:
formControl
formGroup
formArray
Validators : It's validators of your field. Use Angular validators https://angular.io/api/forms/Validators
State Component 🤯
Use Ngxs state management to create the state components. Create three files
.actions.ts : Here you add yours actions classes
.interface.ts : Here you add yout state interface
.state.ts : Here you add your initial state, actions, selectors, etc... For more details NGXS Docs
License
MIT - see LICENSE
5 years ago