Gulp plugin for browserifying and bundling your source code before deploying to webtask.io.
Install with npm:
$ npm install --save gulp-bundle-webtaskvar gulp = require('gulp');
var bundle = require('gulp-bundle-webtask');
gulp.task('default', function() {
return gulp.src('index.js')
.pipe(bundle())
.pipe(gulp.dest('dist'));
});Webtask.io is a server that lets developers publish code to an endpoint that will be executed. They provide a curated list of npm modules that can be used by default, but not every module is available. A developer can use browserify and the node flag to bundle their code and publish the bundled code to webtask but this will bundle all of the included modules (even the ones that webtask already supplies).
This plugin will provide the default options that match the node flag from the browserify command line argument and exclude modules that are already supplied by webtask. This makes it easier to bundle and deploy code to webtask.io in a gulp, assemble, generate, or verb workflow.
Use browserify, gulp-uglify, and defaults for the browserify commandline node flag to bundle source code for a webtask task. This will exclude any npm modules that are already include on the webtask servers.
Params
filename{String}: Optional filename to use when naming the bundled file. Defaults tobundle.js.options{String}: Additional options to pass to browserify.options.minify{Boolean}: Disable minification by setting this option tofalse. Defaults totrue.options.babelify{Boolean|Object}: When set totrue, uses babelify. Set as an object to pass custom options to the babelify transform. Defaults tofalse.returns{Stream}: Returns a stream that can be piped to (as in the example).
Example
gulp.task('bundle', function() {
return gulp.src('index.js')
.pipe(bundle())
.pipe(gulp.dest('dist'));
});Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for avice on opening issues, pull requests, and coding standards.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verbInstall dev dependencies:
$ npm install -d && npm testBrian Woodward
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.30, on September 07, 2016.