node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


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 () {
        callback: "__myJSONPCallbackFunction",
        key: "optionalFilePrefix_"


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

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