override-configs
v0.1.11
Published
An NPM package to help you override and merge your config files.
Readme
override-configs
Installation
Install npm package:
npm install override-configsUsage
const overrideConfigs = require("override-configs");
const defaultConfig = { NODE_ENV: "production" };
const overrideFilePaths = [path.join(__dirname, "config.override.js")];
// optional
const args = [{ webpack: {} }];
const options = { silent: true };
module.exports = overrideConfigs(
defaultConfig,
overrideFilePaths,
args,
options
);Expectations:
- Config file types include:
json,js,cjs. - Config must be the default export.
- Config may be an object or a function.
Configs are merged in the order of lodash.merge.
License
MIT
