1.0.2 • Published 5 years ago
@qusito/json-enum-generator v1.0.2
JSON Enum Generator for TypeScript
A simple tool to help generate a TypeScript enum using a JSON file
Installation
npm install @qusito/json-enum-generator ## run from node_modules/.bin/json-enum-generator
npm install --global @qusito/json-enum-generator ## run from anywhere, calling json-enum-generatorUsage
To use this library you have to provide 3 arguments:
--inputor-i: The full path of the JSON file you want to process, for example~/someDir/someFile.json--outputor-o: The path where the result should be written to, for example~/someProject/src/enums/--enumNameor-n: The name for the enum to be generated--fileNameor-f: The name for the enum file to be generated, if not provided argument--enumNameis used.- The extension .ts is not needed and will be appended by the library
json-enum-generator --input ~/someFile.json --output ~/someDir --enumName SomethingGreatEnum --fileName SomethingGreat.enumMaintainer
This library is maintained by Jules Kreutzer and Qusito