readinirc

0.0.1 • Public • Published

readinirc

NPM Version NPM Downloads test js-standard-style

Load rc files.

Compared to other rc file loaders, this one is more focused. It does not load from cli flags, and does not support anything other than ini format.

Usage

$ npm i readinirc
const rc = require('rc-ini')
 
rc('my-app', (err, conf, files) => {
  if (err) {
    throw err
  }
  // Files which were loaded
  console.log(files)
 
  // The configuration itself
  console.log(conf)
})

CLI

$ inirc help
inirc [command] [opts]

Commands:
  inirc show [name]   print config
  inirc files [name]  print config files
  inirc               help                                                                                     [default]

Options:
  --help      Show help                                                                                        [boolean]
  --version   Show version number                                                                              [boolean]
  --cwd, -D   Directory                                                                                   [default: "."]
  --home, -h  Home                                                                          [default: "/Users/username"]
  --etc, -e   Etc                                                                                      [default: "/etc"]

Readme

Keywords

Package Sidebar

Install

npm i readinirc

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

13 kB

Total Files

19

Last publish

Collaborators

  • wesleytodd