API Docs for:
Show:

Hop.CodeGenerator Class

Defined in: lib/codegen.js:50
Module: CodeGenerator
Parent Module: Hop

Methods

Hop.CodeGenerator.describe

() static

Defined in lib/codegen.js:71

Describe the current generator, aka get the generator.json

Hop.CodeGenerator.generate

() static

Defined in lib/codegen.js:211

This will generate the files utilized for the stub api.

Hop.CodeGenerator.generateTest

() static

Defined in lib/codegen.js:170

This will generate the files utilized for unit test for this generator.

  • The property 'testTemplate' in generator.json will be used as the input file for unit tests.
  • The properties Objects, TestCases, and Models will be passed into the context of the script
  • The property 'output' in options will determine what the output file is called.

Hop.CodeGenerator.list

() static

Defined in lib/codegen.js:59

Lists the various types of generators that exist

Hop.CodeGenerator.toOutputFile

() static

Defined in lib/codegen.js:140

For generators that use a directory structure this will compute the output paths

  • The translatePath property in generator.json can be used to override this function