1.0.32 • Published 12 months ago

aixp-cg v1.0.32

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

aixp-cg

aixp-cg is a code generation tool for generating TypeScript serialization and deserialization code from a YAML schema file. It provides a command-line interface for generating code from the schema file and outputting it to a destination directory as class files.

Installation

You can install aixp-cg using npm:

npm install aixp-cg --save

Usage

To generate TypeScript code from a YAML schema file, use the aixp-cg command:

npx aixp-cg

This command reads the schema.yaml file, generates TypeScript code for serializing and deserializing data according to the schema, and outputs the generated code to the output.ts file.

Configuration

aixp-cg can be configured using a JSON configuration file named aixp-cg.config.json. This file can be placed in the root directory of your project, and it should contain a JSON object with the following properties:

  • input: The path to the input schema file. This can be either an absolute or relative path.

  • output: The path to the output file or directory. If this is a directory, aixp-cg generates separate files for each schema in the directory.

Here is an example aixp-cg.config.json file:

{
  "input": "schema.yaml",
  "output": "src/serialization",
  "options": {
    "camelCase": true
  }
}

To use the configuration file, simply run the aixp-cg command without any options:

npx aixp-cg

This command reads the aixp-cg.config.json file, generates code according to the specified configuration, and outputs the generated code to the configured output file or directory.

Contributing

Contributions are welcome! If you find a bug or would like to suggest an improvement, please create an issue or submit a pull request.

License

aixp-cg is licensed under the MIT License.

1.0.32

12 months ago

1.0.31

12 months ago

1.0.30

12 months ago

1.0.28

12 months ago

1.0.22

12 months ago

1.0.21

12 months ago

1.0.20

12 months ago

1.0.18

12 months ago

1.0.17

12 months ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago