@nhz.io/gulp-stream-config
Installnpm i -S @nhz.io/gulp-stream-config
ref-resolve
Reference resolution is done with
Example
Load configuration from multiple files/** +-+- config
* |
* +--- a.cson
* +--- b.cson
* +--- c.cson
*/
const gulp = require('gulp')
const conf = require('@nhz-io/gulp-stream-config')
const config = {}
const unresolved = []
gulp.task('config', () =>
gulp.src('config/*.cson').pipe(conf(config, unresolved))
)
/** After runing config task the configuration
* will be in `config` and unresolved references
* will be in `unresolved`.
* Also, a warning will be shown for each unresolved match
*/
License
MIT
Merge and resolve JSON/CSON referencesInstall
npm i -S @nhz.io/gulp-stream-config
ref-resolve
Reference resolution is done withExample
Load configuration from multiple files
/** +-+- config
* |
* +--- a.cson
* +--- b.cson
* +--- c.cson
*/
const gulp = require('gulp')
const conf = require('@nhz-io/gulp-stream-config')
const config = {}
const unresolved = []
gulp.task('config', () =>
gulp.src('config/*.cson').pipe(conf(config, unresolved))
)
/** After runing config task the configuration
* will be in `config` and unresolved references
* will be in `unresolved`.
* Also, a warning will be shown for each unresolved match
*/