gulp-json-wrapper

1.0.0 • Public • Published

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'.

Package Sidebar

Install

npm i gulp-json-wrapper

Weekly Downloads

8

Version

1.0.0

License

MIT

Last publish

Collaborators

  • krowten