Skip to content

anipendakur/gulp-jsonp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gulp JSONP plugin

Simple JSONP wrapper Gulp Plugin. ###Installation   npm version

npm install gulp-jsonp

###Simple Usage

var gjsonp = require("gulp-jsonp");

/**
 * Build JS
 */
gulp.task('js', function () {
  gulp.src(['./src/**/*.html'])
    .pipe(gjsonp({
        callback: "__myJSONPCallbackFunction"
      }))
    .pipe(gulp.dest('./dist/'));
});

###Output The plugin will rename files to have a .js extension, and wrap the contents in an object like so:

__myJSONPCallbackFunction({"filename":"index.html","contents":"[BASE64 ENCODED CONTENTS]"});

About

JSONP Wrapper for Gulp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%