Create javascript config from json file. Plugin for gulp
#Install
npm install gulp-json-wrapper
#Basic Usage
Something like this:
var gulp = require('gulp');
var concat = require('gulp-concat')
var json = require('gulp-json-wrapper')
gulp.task('js', function () {
gulp.src('./scripts/*.js')
.pipe(json({
src: 'path/to/config.json',
namespace: 'myconfig'
}))
.pipe(concat('script.js'))
.pipe(gulp.dest('./js'));
});
Path to json file.
Wrapped in angular module. Default false.
Name of angular module. Default 'json'.
Variable name. Default 'config'.