0.0.5 • Published 8 years ago

simpler-config v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
8 years ago

simpler-config

A really simple config library.

travis npm standard

Installation:

npm i simpler-config --save

A few examples:

// require the library and then call load once with an object to setup your config.

// You can use a JS file (don't forget module.exports)
const config = require('simpler-config').load(require('./config'))

// or a JSON file
const config = require('simpler-config').load(require('./config.json'))

// or an object
const config = require('simpler-config').load({someKey: 'Some Value'}))

// or something far too fancy
const config = require('simpler-config').load({
	dev: require('./dev'),
	staging: require('./staging'),
	production: require('./production')
}[process.env.name])

// Right. You get the idea.

// meanwhile, in another file in a directory far far away
const config = require('simpler-config')
console.log(config.someKey)

Here's another example as well.

0.0.5

8 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago