1.0.1 ā€¢ Published 3 years ago

config-convert v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

config-convert

GitHub npm CI workflows

šŸš€ Need to convert a JS config file to JSON or vice-versa? Are you also very lazy and want a tool to do this for you? Welcome to config-convert.

šŸ“„ Installation

You can install this package from NPM

  • npm install -g config-convert
  • yarn global add config-convert

āš” Usage

config-convert -f <input_file>

Options:
  -f, --file     Path to the file to convert.                [string] [required]
  -t, --to       What format to convert to               [choices: "js", "json"]
  -o, --output   The name of the output file.                           [string]
      --es6      For converting to JS, whether to use es6 exports.     [boolean]
  -b, --baseDir  Set the base dir of where to start the path.           [string]

Examples

Say we have a directory that looks like this:

your-project/
ā”œā”€ .eslintrc.js
ā”œā”€ src/
ā”œā”€ package.json

You have your .eslintrc.js file that you want to convert to .eslintrc.json.
Simply run config-convert -f .eslintrc.js and voila! Converted and written to a .eslintrc.json file!

āœ‹ Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please ensure any and all commits pass our tests, linting, and build steps

āš–ļø LICENSE

Licensed under the MIT License

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago