Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement a default main generator (API first) #59

Closed
sthzg opened this issue Jun 8, 2019 · 1 comment
Closed

feat: Implement a default main generator (API first) #59

sthzg opened this issue Jun 8, 2019 · 1 comment

Comments

@sthzg
Copy link
Owner

sthzg commented Jun 8, 2019

The main generator should take a config file and run all generations defined in it. After the API implementation it should be made available as the root jsugen CLI command (i.e. executed when no subcommand is given).

Motivation:

a) Clients should be able to express their required generators in a config file format
b) Running multiple generators should not require any client-side wrapper scripts
c) Users should be able to maintain their own generators rather than relying on those implemented in the package
d) Generation should not require installing the package and its dependencies to the local dependency tree (hint: convenience with npx)

Early config format draft:

definitions:
  - # input format
    source: 'json-schema' 
    # source files as string or array of strings in glob format
    files: '**/*.schema.json' 
    # array of generator plugins to run (dynamically resolved to allow user plugins)
    generators: 
      - enums
      - selector-functions
      - member-names
      - lodash-object-paths
    # target directory to store generated files
    output: 
      baseDirectory: './'

Working branch:
https://github.com/sthzg/jsugen/tree/feature/59

@sthzg
Copy link
Owner Author

sthzg commented Jun 18, 2019

Closed with #62

@sthzg sthzg closed this as completed Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant