1.0.0 • Published 10 years ago
gulp-json-wrapper v1.0.0
gulp-json-wrapper
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'));
});
gulp-json-wrapper specific options
src: String
Patch to json file.
angular: Boolean
Wrapped in angular module. Default false.
module: String
Name of angular module. Default 'json'.
namespace: String
Variable name. Default 'config'.
1.0.0
10 years ago