0.0.2 • Published 1 year ago

@0bdx/gen-class v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@0bdx/gen-class

Generates files containing JavaScript classes and unit tests, based on a JSON schema.

  Version: 0.0.2
  NPM: https://www.npmjs.com/package/@0bdx/gen-class
  Repo: https://github.com/0bdx/gen-class
  Homepage: https://0bdx.com/gen-class

@TODO add an overview

Installation and usage

gen-class can be installed as dependency for programmatic use, or as a command line app.

Installation and usage as a dev-dependency

npm install @0bdx/gen-class --save-dev
import genClass from '@0bdx/gen-class';

console.log(genClass({
    name: 'MyClass',
    instance: {
        scalars: [
            { isOk: { type: 'boolean' } }
        ]
    }
}));

Installation and usage as a command line app

Make a folder called 'my/src/classes/', and a file called 'basic-class.json':

{
    "name": "MyClass",
    "instance": {
        "scalars": [
            { "isOk": { type: "boolean" } }
        ]
    }
}
npm install @0bdx/gen-class --global
gen-class --help
gen-class --version
gen-class examples/example-1/basic-class.json --output examples/example-1
gen-class my-class-definitions.json --output my/src/classes/
0.0.2

1 year ago

0.0.1

1 year ago