1.0.0 • Published 10 months ago

h5p-generate-configs v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

h5p-generate-configs

A tool for creating common H5P config files out of a TypeScript definition.

Generate semantics

To run the program that generates semantics, run h5p-generate-configs generate-semantics or h5p-generate-configs s.

To generate semantics.json from semantics.ts, provide the path to semantics.ts. The JSON will by default be outputted to the current directory:

$ h5p-generate-configs s --type-definition src/semantics.ts

The tool can also create a TypeScript type file for the translation keys found in semantics.ts. Provide an output path as such:

$ h5p-generate-configs s -i src/semantics.ts -t src/TranslationKey.ts

Options

NameAliasDescriptionRequiredDefault
--type-definition-dPath to the TypeScript definition of semanticstrue-
--out-oPath to JSON outputfalsesemantics.json
--translations-tPath to translation type output. The file won't be created if not providedfalse-

Generate library

To run the program that generates library.json, run h5p-generate-configs generate-library or h5p-generate-configs l.

To generate library.json from library.ts, provide the path to library.ts. The JSON will by default be outputted to the current directory:

$ h5p-generate-configs l --type-definition src/library.ts

Options

NameAliasDescriptionRequiredDefault
--type-definition-dPath to the TypeScript definition of librarytrue-
--out-oPath to JSON outputfalselibrary.json

Publishing to NPM

To package the CLI up for NPM, do this:

$ npm run publish-to-npm
1.0.0

10 months ago

0.4.2

1 year ago

0.4.1

2 years ago

0.4.0

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.5

2 years ago

0.0.2

2 years ago