1.0.32 • Published 2 years ago

aixp-cg v1.0.32

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.28

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago