@nhz.io/gulp-stream-config

1.0.5 • Public • Published

@nhz.io/gulp-stream-config

NPM Version Bithound Status License Downloads

Merge and resolve JSON/CSON references

Install

npm i -S @nhz.io/gulp-stream-config

Reference resolution is done with ref-resolve

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

Package Sidebar

Install

npm i @nhz.io/gulp-stream-config

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • ishi.ruy