JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 174613
  • Score
    100M100P100Q151102F
  • License MIT

Merges together config data loaded from external JSON files

Package Exports

  • config-master

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (config-master) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads per month Build Status Dependency Status

config-master ⇒ Object

Merges together JSON data from the specified files, in the specified order. Designed for app config management.

Param Type Description
...jsonPath string the paths of JSON files to merge. If the JSON data you want to merge is contained within the JSON file, pass an object specifying the jsonPath and configProperty.

Example

var loadConfig = require("config-master");
var homePath = require("home-path");

var config = loadConfig(
    path.join(homePath(), ".config.json"),
    path.join(process.cwd(), ".config.json"),
    { jsonPath: path.join(process.cwd(), "package.json"), configProperty: "dmd" }
);

© 2015 Lloyd Brookes 75pound@gmail.com. Documented by jsdoc-to-markdown.