2.0.0 • Published 4 years ago
@alextanhongpin/gen-cli v2.0.0
Gen-CLI
Code generation with js.
Configuration
Example config.json
that contains two commands, controller
and service
. Calling $ gen g controller foo
will then create the template files first if it doesn't exist, and then the destination files. See config.sample.json5
.
Usage
# Initialize config file.
$ gen init
# Run the template generation.
$ gen g <type> <name>
Templating
Uses handlebar.js
because it allows us to register helpers.
TODO
- read config from package.json, "gen"
- ~force overwrite if exists~ warn if exists
- better UI
- allow configuration of templates (passing helpers)
- compile to supported js versions
- a golang version