Skip to content

CLI

Binary name: properties-to-js

Required flags

LongShortDescription
--input-iPath to the input .properties file
--output-oOutput file path; extension must be .js, .ts, or .json

Optional flags

LongShortDefaultDescription
--type-tjsonOutput type: json, js, ts
--delimiter-d.Delimiter for flattened keys
--flatted-foffCollapse nested structure to single-level keys
--uppercase-uoffUppercase all keys
--lowercase-loffLowercase all keys

--uppercase and --lowercase are not meant to be used together; pick one.

Examples

bash
properties-to-js -i config.properties -o config.js
properties-to-js -i config.properties -o config.ts -t ts
properties-to-js -i config.properties -o config.json -t json
properties-to-js -i config.properties -o out.js -f -d "_" -u

Output file and --type

The file extension must match --type; otherwise saving throws (for example -o out.json with -t json).

Released under the ISC License.