geenee
TypeScript icon, indicating that this package has built-in type declarations

0.1.28 • Public • Published

geenee logo

Code Regenerator. Reapplies your template without losing your changes

oclif Version Downloads/week License

  • 📋 Why
  • Steps
  • 💡 A Funny Sample
  • 🔧 Usage
  • Commands
  • Help

📋 Why

Whenever you use a template that later gets updated, you normally have a problem. You can regenerate from scratch or you can't use the new version. But with geenee, you can reapply the template without losing your custom code!

Steps

  1. Run settings if you haven't yet, and set or modify what you want to generate:
npx geenee $CODE_PATH
  1. You should always check first to be sure that your changes will be safe:
npx geenee check $CODE_PATH
  1. You should regenerate your code after you:
  • update your template (follow the instructions with its README)
  • update your settings file.

Here's the command:

npx geenee generate $CODE_PATH
  1. After you generate, you should always run npm i to install everything.

If you would like to install geenee globally to save time, call:

npm i -g geenee

Then, you can simply call the commands directly using geenee <command> instead of npx geenee <command>.

See more complete instructions below in Usage.

💡 A Funny Sample

geenee is actually a recursive tool: geenee was generated by geenee! 😃 It is based on the easy-oclif-cli template.

geenee sample

🔧 Usage

$ npm install -g geenee
$ geenee COMMAND
running command...
$ geenee (-v|--version|version)
geenee/0.1.24 win32-x64 node-v14.15.5
$ geenee --help [COMMAND]
USAGE
  $ geenee COMMAND
...

Commands

geenee check CODE

checks that the code has been entered safely, meaning that regeneration won't lose any changes

USAGE
  $ geenee check CODE

ARGUMENTS
  CODE  path to the code base to check

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ geenee check sampleCode

See code: src/commands/check.ts

geenee generate CODE

generates code based on a template and a settings file. To set the template, you need the template flag.

USAGE
  $ geenee generate CODE

ARGUMENTS
  CODE  path to the code base to generate

OPTIONS
  -h, --help               show CLI help

  -n, --noSetup            Do not update the startup routine (this is only relevant when the template flag is also
                           used). Saves a lot of time for a template developer.

  -t, --template=template  Template directory. Will generate from the template, and will override any prior template or
                           template version used.

EXAMPLE
  $ geenee generate sampleCode -t sampleTemplate -n
  You have executed the generate command...

See code: src/commands/generate.ts

geenee help [COMMAND]

display help for geenee

USAGE
  $ geenee help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

geenee settings CODE

change your settings for the next generation

USAGE
  $ geenee settings CODE

ARGUMENTS
  CODE  path to the code base

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ geenee settings sampleCode
  You have executed the settings command...

See code: src/commands/settings.ts

Help

Readme

Keywords

Package Sidebar

Install

npm i geenee

Weekly Downloads

0

Version

0.1.28

License

MIT

Unpacked Size

118 kB

Total Files

115

Last publish

Collaborators

  • yisroel