Skip to content

Commit

Permalink
Fixes ionic-team#49 - watch multiple bundles conflict
Browse files Browse the repository at this point in the history
For more details about the bug see here: ionic-team#49
  • Loading branch information
Zorgatone authored Aug 11, 2016
1 parent 6ac3f24 commit c5869d1
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions browserify-es2015/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,33 @@ var gulp = require('gulp'),
uglify = require('gulp-uglify'),
stream = require('stream');


var defaultOptions = {
watch: false,
src: './app/app.js',
outputPath: 'www/build/js/',
outputFile: 'app.bundle.js',
minify: false,
browserifyOptions: {
cache: {},
packageCache: {},
debug: true
},
watchifyOptions: {},
babelifyOptions: {
presets: [babelES2015Preset],
plugins: [babelDecoratorsTransform]
},
uglifyOptions: {},
onError: function(err){
console.error(err.toString());
this.emit('end');
},
onLog: function(log){
console.log((log = log.split(' '), log[0] = pretty(log[0]), log.join(' ')));
module.exports = function(options) {
var defaultOptions = {
watch: false,
src: './app/app.js',
outputPath: 'www/build/js/',
outputFile: 'app.bundle.js',
minify: false,
browserifyOptions: {
cache: {},
packageCache: {},
debug: true
},
watchifyOptions: {},
babelifyOptions: {
presets: [babelES2015Preset],
plugins: [babelDecoratorsTransform]
},
uglifyOptions: {},
onError: function(err){
console.error(err.toString());
this.emit('end');
},
onLog: function(log){
console.log((log = log.split(' '), log[0] = pretty(log[0]), log.join(' ')));
}
}
}

module.exports = function(options) {
options = merge(defaultOptions, options);

var b = browserify(options.src, options.browserifyOptions)
Expand Down

0 comments on commit c5869d1

Please sign in to comment.