0.0.1 • Published 5 years ago

ng-gempe v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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? 🤔

  1. Install cli with npm i -g gempe
  2. Run gempe g or gempe generate
  3. Select a componetent type
  4. Select a component's name
  5. Select the module path to which your component belongs (dont need add 'src/app')
  6. Enter the required options
  7. 👨‍💻

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

0.0.1

5 years ago