Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spoonx/wetland-generator-entity
A wetland generator for wetland entities.
https://github.com/spoonx/wetland-generator-entity
Last synced: about 1 month ago
JSON representation
A wetland generator for wetland entities.
- Host: GitHub
- URL: https://github.com/spoonx/wetland-generator-entity
- Owner: SpoonX
- License: mit
- Created: 2017-04-06T07:56:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T19:17:43.000Z (over 6 years ago)
- Last Synced: 2024-11-17T16:05:24.021Z (about 1 month ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Board wetland entity
A [boards](https://github.com/SpoonX/boards) generator for [wetland](https://wetland.spoonx.org) entities.
Supports typescript and javascript.## Installation
Install local to enable the generator in the project:
`npm i -D wetland-generator-entity`
## Usage
Wetland generators automatically register themselves with the [wetland-cli](https://github.com/SpoonX/wetland-cli).
`wetland generator entity [flags]`
### Options
The following options / flags can be passed in to the generator.
| option | description |
| :------------- | :------------- |
| -l, --language | One of "ts" or "js" for the target language (defaults to js) |
| -e, --extend | Set to extend wetland.Entity for .toObject (defaults to false) |
| -f, --fields | Fields to add. E.g. `-f username:string,password:string` |
| -i, --interactive | Use interactive mode to design the entity |### Generate
Fields can be passed in using JSON, or the [ezon](https://github.com/SpoonX/ezon) format.
`wetland generator entity user -l ts -f 'username,password:(size:50),active:boolean'`
or
`wetland generator entity user -l ts -f 'username:string,password:field(size:50),active:field(type:boolean)'`
### Interactive
This generator also offers an interactive mode. Simply pass in the `-i` or `--interactive` flag.
`wetland generator entity user -i`
## Missing
At the moment you can't generate:
- indexes
- uniques
- relationsThese will be added in future versions
## License
MIT