Skip to content
Snippets Groups Projects
Commit c22eccb6 authored by Glenn Vorhes's avatar Glenn Vorhes
Browse files

move browserify, babelify config back into function with global flag

parent b145667f
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,18 @@ function bundleEs2015(inputFile, outFile, production) { ...@@ -70,7 +70,18 @@ function bundleEs2015(inputFile, outFile, production) {
inputFile = glob.sync('./spec/**/*.js'); inputFile = glob.sync('./spec/**/*.js');
} }
var bundler = browserify(inputFile); var bundler = browserify({
entries: inputFile,
cache: {},
packageCache: {},
debug: true
});
bundler.transform(babelify.configure({
global: true,
presets: ["es2015"],
ignore: /ol\-build\.js|jquery\.min|\/node_modules\/(?!webmapsjs\/)/
}));
if (!production) { if (!production) {
bundler = watchify(bundler); bundler = watchify(bundler);
......
...@@ -60,19 +60,5 @@ ...@@ -60,19 +60,5 @@
"vinyl-buffer": "^1.0.0", "vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0", "vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0" "watchify": "^3.7.0"
},
"browserify": {
"debug": true,
"transform": [
[
"babelify",
{
"presets": [
"es2015"
],
"ignore": ["ol-build.js", "jquery.min"]
}
]
]
} }
} }
...@@ -24,3 +24,8 @@ let layerArray = [ ...@@ -24,3 +24,8 @@ let layerArray = [
]; ];
let legend = new LayerLegend(layerArray, 'legend-container', {}); let legend = new LayerLegend(layerArray, 'legend-container', {});
...@@ -67,10 +67,17 @@ export function bundleEs2015(inputFile, outFile, production) { ...@@ -67,10 +67,17 @@ export function bundleEs2015(inputFile, outFile, production) {
{ {
entries: inputFile, entries: inputFile,
cache: {}, cache: {},
packageCache: {} packageCache: {},
debug: true
} }
); );
bundler.transform(babelify.configure({
global: true,
presets: ["es2015"],
ignore: /ol\-build\.js|jquery\.min|\/node_modules\/(?!webmapsjs\/)/
}));
if (!production) { if (!production) {
bundler = watchify(bundler); bundler = watchify(bundler);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment