Skip to content

Commit 7d9721b

Browse files
authored
Fix ionic-team#49 - watch multiple bundles conflict
For more details about the bug see here: ionic-team#49
1 parent 6ac3f24 commit 7d9721b

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

browserify-es2015/index.js

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,33 @@ var gulp = require('gulp'),
1212
uglify = require('gulp-uglify'),
1313
stream = require('stream');
1414

15-
16-
var defaultOptions = {
17-
watch: false,
18-
src: './app/app.js',
19-
outputPath: 'www/build/js/',
20-
outputFile: 'app.bundle.js',
21-
minify: false,
22-
browserifyOptions: {
23-
cache: {},
24-
packageCache: {},
25-
debug: true
26-
},
27-
watchifyOptions: {},
28-
babelifyOptions: {
29-
presets: [babelES2015Preset],
30-
plugins: [babelDecoratorsTransform]
31-
},
32-
uglifyOptions: {},
33-
onError: function(err){
34-
console.error(err.toString());
35-
this.emit('end');
36-
},
37-
onLog: function(log){
38-
console.log((log = log.split(' '), log[0] = pretty(log[0]), log.join(' ')));
15+
module.exports = function(options) {
16+
var defaultOptions = {
17+
watch: false,
18+
src: './app/app.js',
19+
outputPath: 'www/build/js/',
20+
outputFile: 'app.bundle.js',
21+
minify: false,
22+
browserifyOptions: {
23+
cache: {},
24+
packageCache: {},
25+
debug: true
26+
},
27+
watchifyOptions: {},
28+
babelifyOptions: {
29+
presets: [babelES2015Preset],
30+
plugins: [babelDecoratorsTransform]
31+
},
32+
uglifyOptions: {},
33+
onError: function(err){
34+
console.error(err.toString());
35+
this.emit('end');
36+
},
37+
onLog: function(log){
38+
console.log((log = log.split(' '), log[0] = pretty(log[0]), log.join(' ')));
39+
}
3940
}
40-
}
4141

42-
module.exports = function(options) {
4342
options = merge(defaultOptions, options);
4443

4544
var b = browserify(options.src, options.browserifyOptions)

0 commit comments

Comments
 (0)