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

moved browserify config to package.json

parent 8e848fdf
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
"ol": "node node_modules/openlayers/tasks/build.js src/ol/ol-config.json src/ol/ol-build.js",
"lint": "eslint src/**/*.js",
"jsdoc": "jsdoc -r -d doc src",
"src2lib": "babel src --out-dir lib --presets es2015 --ignore ol-build.js & COPY /Y src\\ol\\ol-build.js lib\\ol\\ol-build.js"
"src2lib": "babel src --out-dir lib --presets es2015 --plugins add-module-exports --ignore ol-build.js & COPY /Y src\\ol\\ol-build.js lib\\ol\\ol-build.js"
},
"author": "TOPS Lab",
"license": "ISC",
......@@ -60,5 +60,21 @@
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0"
},
"browserify": {
"cache": {},
"packageCache": {},
"debug": true,
"transform": [
[
"babelify",
{
"presets": [
"es2015"
],
"ignore": "ol/-build/.js|jquery/.min"
}
]
]
}
}
......@@ -63,19 +63,7 @@ export function bundleEs2015(inputFile, outFile, production) {
inputFile = glob.sync('./spec/**/*.js');
}
let bundler = browserify(
{
entries: inputFile,
cache: {},
packageCache: {},
debug: true
}
);
bundler.transform(babelify.configure({
presets: ["es2015"],
ignore: /ol\-build\.js|jquery\.min/
}));
let bundler = browserify(inputFile);
if (!production) {
bundler = watchify(bundler);
......@@ -152,7 +140,7 @@ export function processLessFile(inputFile, outputFile) {
*/
export function bundleEs2015Multiple(fileArray, production){
"use strict";
let outStream;
for (let f of fileArray){
......
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