Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zkochan/rcfile
Loads library configuration in all possible ways
https://github.com/zkochan/rcfile
Last synced: 2 months ago
JSON representation
Loads library configuration in all possible ways
- Host: GitHub
- URL: https://github.com/zkochan/rcfile
- Owner: zkochan
- License: mit
- Created: 2016-05-29T09:36:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-27T22:53:43.000Z (about 7 years ago)
- Last Synced: 2024-11-02T06:11:43.213Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 79.1 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rcfile
> Loads library configuration in all possible ways
[![npm version](https://img.shields.io/npm/v/rcfile.svg?style=flat-square)](https://www.npmjs.com/package/rcfile) [![Build Status](https://img.shields.io/travis/zkochan/rcfile/master.svg?style=flat-square)](https://travis-ci.org/zkochan/rcfile) [![Coverage Status](https://img.shields.io/coveralls/zkochan/rcfile/master.svg?style=flat-square)](https://coveralls.io/r/zkochan/rcfile?branch=master)
Read library configurations from `yaml`, `json`, `js` files or from sections in `package.json`.
## Installation
```sh
npm install --save rcfile
```## Usage
```js
'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](./LICENSE) © [Zoltan Kochan](http://kochan.io)