Skip to content

Find and load a YAML or JSON config file from a local project, installed npm module, or the user's home directory.

License

Notifications You must be signed in to change notification settings

mbonaci/config-file

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

config-file NPM version

Find and load a YAML or JSON config file from a local project, installed npm module, or the user's home directory.

Installation

npm i config-file --save
bower install config-file --save

Usage

var config = require('config-file');

config.load

config.load('.whateverrc'); // assumes JSON
config.load('.whateverrc', {parse: 'yaml'});

config.npmLoad

config.npmLoad('foo'); // npm module name
config.npmLoad('foo', 'package.json'); // default is package.json, can be anything
config.npmLoad('foo', '.whatever.yml.', {parse: 'yaml'});

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

About

Find and load a YAML or JSON config file from a local project, installed npm module, or the user's home directory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%