@alextanhongpin/gen-cli

2.0.0 • Public • Published

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

  • [x] read config from package.json, "gen"
  • [x] force overwrite if exists warn if exists
  • [ ] better UI
  • [x] allow configuration of templates (passing helpers)
  • [ ] compile to supported js versions
  • [ ] a golang version

/@alextanhongpin/gen-cli/

    Package Sidebar

    Install

    npm i @alextanhongpin/gen-cli

    Weekly Downloads

    4

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    38.5 kB

    Total Files

    22

    Last publish

    Collaborators

    • alextanhongpin