1.0.4 • Published 9 years ago

srob-config v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago

srob-config

Configuration loader

Installation

npm install srob-config

Usage

var configLoad = require('srob-config');

configLoad.load([
        // Files list.
        __dirname + "/path/to/foo.js", // JS file imported using a require().
        "bar.yml", // Yaml file
        { // Plain old config object
            foo: "Bar",
            plop: "Hello, world !", // Will be "Hello, WORLD !" in the result due to a string replacement (see below).
        }
    ], 
    [
        // Load-time strings replacement list.
        // Every occurrence of the first string will be replaced in the config leaf strings
        ["{dirname}", __dirname],
        ["{Foo}", "bar"],
        ["world", "WORLD"],
    ])
    .done(function(config) {
        // Here your full config object is ready.
    });
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago