0.0.1 • Published 8 years ago

gulp-browserify-js-inline v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Browserify TypeScript Task

Use Browserify to transpile and bundle your TypeScript 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.ts', './typings/main.d.ts'].
  • 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
}

Notes

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

Example

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

gulp.task('build', browserifyBuild);

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