ionic-gulp-browserify-es2015
Gulp task for Ionic projects to transpile and bundle ES2015 sources with Browserify
Last updated 4 years ago by tlancina .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ionic-gulp-browserify-es2015 
SYNC missed versions from official npm registry.

Browserify ES2015 Task

Use Browserify to transpile and bundle your ES2015 source files.

API

browserifyBuild([options])

Returns a stream of Vinyl files that can be piped.

Available options:

  • watch (boolean) Whether to watch for changes or not. Default: false.
  • src (string|File|Array) String, file object, or array of those types (they may be mixed) specifying Browserify entry file(s). Default: './app/app.js'.
  • outputPath (string) Output path for the bundle and sourcemaps. Default: 'www/build/js/'.
  • outputFile (string) Name of the bundle. Default: 'app.bundle.js'.
  • minify (boolean) Whether to minify the bundle using Uglify or not. Default: false.
  • browserifyOptions (Object) Browserify options. Defaults:
{
  cache: {},
  packageCache: {},
  debug: true //sourcemaps on
}
{
  presets: ['es2015'],
  plugins: ['transform-decorators-legacy']
}
  • uglifyOptions (Object) Uglify options for when minify is true. Default: {}.

Notes

If your npm version is 2 or below, it is recommended that you update to npm 3 to speed up the time it takes Babel to transpile your source files.

Also, setting options.browserifyOptions.debug to false will disable sourcemaps and drastically speed up your rebuilds when watching.

Example

var browserifyBuild = require('ionic-gulp-browserify-es2015');

gulp.task('build', browserifyBuild);

gulp.task('watch', function(){
  return browserifyBuild({
    watch: true,
    browserifyOptions: { debug: false } //if you want to disable sourcemaps
  });
});

Current Tags

  • 1.1.0                                ...           latest (4 years ago)

4 Versions

  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (12)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |