Skip to content

Repository files navigation

rcfile

Loads library configuration in all possible ways

npm version Build Status Coverage Status

Read library configurations from yaml, json, js files or from sections in package.json.

Installation

npm install --save rcfile

Usage

'use strict'
var rcfile = require('rcfile')

console.log(rcfile('eslint'))
//> { extends: 'standard',
//    rules:
//     { 'comma-dangle': [ 2, 'always-multiline' ],
//       'arrow-parens': [ 2, 'as-needed' ] } }

console.log(rcfile('travis', { configFileName: '.travis' }))
//> { language: 'node_js',
//    sudo: false,
//    node_js: [ 'v0.10', 'v4' ],
//    cache: { directories: [ 'node_modules' ] },
//    before_install: [ 'npm install -g npm@3' ],
//    install: [ 'npm install' ],
//    after_success:
//     [ 'if [[ $TRAVIS_NODE_VERSION == "v4" ]]; then npm run coveralls; fi;',
//       'if [[ $TRAVIS_NODE_VERSION == "v4" ]]; then npm run semantic-release; fi;' ] }

License

MIT © Zoltan Kochan

About

Loads library configuration in all possible ways

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages