Newlywed Party Monsters

    gulp-jsclosure

    0.0.1 • Public • Published

    gulp-jsclosure Build Status

    Javascript closure creator for gulp.

    var closure = require('gulp-jsclosure');

    Sample

    A simple javascript file (file.js):

    var a = 1;
    var b = 2;

    Options: null

    ;(function() {
    var a = 1;
    var b = 1;
    })();

    Options: array (e.g. closure(['angular', 'window']))

    ;(function(angular, window) {
    var a = 1;
    var b = 2;
    })(angular, window);

    Options: object (e.g. closure({angular:true, window: true}))

    ;(function(angular, window) {
    var a = 1;
    var b = 2;
    })(angular, window);

    Example Usage

    gulp.src('./js/*.js')
      .pipe(closure())
      .pipe(gulp.dest('./dist/'));
    gulp.src('./js/*.js')
      .pipe(closure({ window: true , document: true }))
      .pipe(gulp.dest('./dist/'));
    gulp.src('./js/*.js')
      .pipe(closure(['window', 'document']))
      .pipe(gulp.dest('./dist/'));

    License

    MIT

    Install

    npm i gulp-jsclosure

    DownloadsWeekly Downloads

    65

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • jshcrowthe