From 139ebd1018f40935cb7da11374d6b8cd8fe42054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 8 Aug 2021 12:53:15 +0200 Subject: [PATCH] Improve babel and minify-ing code --- .babelrc | 2 +- index.php | 2 +- package.json | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.babelrc b/.babelrc index 6c6d00c7..5ae4be94 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - "@babel/es2015" + "@babel/preset-env" ] } diff --git a/index.php b/index.php index 341956a4..53afc54e 100644 --- a/index.php +++ b/index.php @@ -54,7 +54,7 @@ html_export_var(array( - + diff --git a/package.json b/package.json index f9605693..91901870 100644 --- a/package.json +++ b/package.json @@ -50,20 +50,19 @@ }, "scripts": { "test": "mocha --bail", - "build": "npm run build-locales && browserify -g browserify-css src/index.js -t [ babelify ] -p tinyify -o dist/openstreetbrowser.js", + "build": "npm run build-locales && browserify -g browserify-css src/index.js -t [ babelify ] -o dist/openstreetbrowser.js && minify dist/openstreetbrowser.js > dist/openstreetbrowser.min.js", "build-locales": "for i in `ls locales/` ; do browserify locales/$i -o dist/locale-$i ; done", "watch": "npm run build-locales && watchify --debug -g browserify-css src/index.js -o dist/openstreetbrowser.js -v", "prepare": "npm run build", "lint": "standard src/*.js" }, "devDependencies": { - "@babel/preset-es2015": "^7.0.0-beta.53", "browserify": "^17.0.0", "browserify-css": "^0.15.0", "leaflet-polylinedecorator": "git+https://github.com/plepe/Leaflet.PolylineDecorator.git", + "minify": "^7.0.2", "mocha": "^8.2.1", "standard": "^16.0.3", - "tinyify": "^3.0.0", "watchify": "^3.11.1" }, "standard": {