Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhz-io/gulp-stream-config
Merge JSON/CSON files and resolve references
https://github.com/nhz-io/gulp-stream-config
Last synced: 3 days ago
JSON representation
Merge JSON/CSON files and resolve references
- Host: GitHub
- URL: https://github.com/nhz-io/gulp-stream-config
- Owner: nhz-io
- License: mit
- Created: 2016-09-10T16:31:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-13T22:18:34.000Z (over 8 years ago)
- Last Synced: 2024-05-02T02:19:28.130Z (8 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@nhz.io/gulp-stream-config
Merge and resolve JSON/CSON references
## Install
```
npm i -S @nhz.io/gulp-stream-config
```## Reference resolution is done with [ref-resolve](https://github.com/nhz-io/ref-resolve)
## Example
### Load configuration from multiple files
```javascript
/** +-+- 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](LICENSE)