Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Board wetland entity

A boards generator for wetland 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.

wetland generator entity <name> [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 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
  • relations

These will be added in future versions

License

MIT

About

A wetland generator for wetland entities.

Resources

License

You can’t perform that action at this time.