GithubHelp home page GithubHelp logo

zaida04 / config-convert Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 328 KB

๐Ÿ”ง Convert your config files from JS to JSON or vice-versa.

License: MIT License

TypeScript 66.70% JavaScript 32.42% Shell 0.88%
config converter js-to-json json-to-js

config-convert's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.