Merges environment config, default properties and runtime options.
You can add strict type checking for configuration object parameters with Merger class. See below for details.
Supports ES5, ES7, AMD, CommonJS, System and EcmaScript modules.
npm install --save @nod/configuration
import { Configuration } from '@nod/configuration';
process.env.DUMMY_TEST = 'works';
class ExampleConfiguration extends Configuration {
//add some default properties
example = true;
}
let config = new ExampleConfiguration({
example = false
};
console.log(config.example, config.dummy.test);
//outputs : false, 'works'
See Test for full typesafe usage example.
gulp
#will build and start watching for changes
or
npm run build
npm run watch
or
npm run default
Please check other available gulp tasks with:
gulp -T
- Gulp tasks as another dependency
- More detailed inline docs
by NOD studios