From 02101ef10f71c67151410a9d4301e0c37b568621 Mon Sep 17 00:00:00 2001
From: unknown <david.hoksza@gmail.com>
Date: Tue, 8 Oct 2019 16:02:21 +0200
Subject: [PATCH] support of major browsers since 2015; dependencies update

---
 babel.config.js        | 14 ++++++++++++++
 package.json           | 21 ++++++++++++---------
 src/js/introduction.js |  2 +-
 3 files changed, 27 insertions(+), 10 deletions(-)
 create mode 100644 babel.config.js

diff --git a/babel.config.js b/babel.config.js
new file mode 100644
index 0000000..eaf086f
--- /dev/null
+++ b/babel.config.js
@@ -0,0 +1,14 @@
+const presets = [
+    [
+        "@babel/env",
+        {
+            targets: {
+                "browsers": ["chrome >= 40 or firefox >= 35 or safari > 9"]
+            },
+            useBuiltIns: "usage",
+            corejs: 3,
+        },
+    ],
+];
+
+module.exports = { presets };
\ No newline at end of file
diff --git a/package.json b/package.json
index d265095..e6b3c12 100644
--- a/package.json
+++ b/package.json
@@ -4,27 +4,30 @@
   "description": "",
   "main": "index.js",
   "scripts": {
+    "babel": "babel src -d __tmp_minerva_plugin -D ",
+    "clean-babel": "rimraf __tmp_minerva_plugin",
     "build-css": "node-sass --include-path src/css src/css/styles.scss src/css/styles.css",
-    "build": "mkdirp dist && npm run build-css && browserify -t [ babelify --presets es2015 ] -t browserify-css src/js/index.js | uglifyjs --compress --mangle > dist/plugin.js ",
-    "build-debug": "mkdirp dist && npm run build-css && browserify -t [ babelify --presets es2015 ] -t browserify-css src/js/index.js> dist/plugin.js ",
-    "watch-js": "mkdirp dist && npm run build-css && watchify -v -t [ babelify --presets es2015 ] -t browserify-css src/js/index.js -o dist/plugin.js",
-    "clean": "rimraf dist"
+    "build": "mkdirp dist && npm run build-css && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js | uglifyjs --compress --mangle > dist/plugin.js && npm run clean-babel",
+    "build-debug": "mkdirp dist && npm run build-css  && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js > dist/plugin.js && npm run clean-babel",
+    "clean": "rimraf dist && npm run clean-babel"
   },
   "author": "David Hoksza",
   "license": "MIT",
   "devDependencies": {
-    "babel-core": "^6.26.0",
-    "babel-preset-es2015": "^6.24.1",
-    "babelify": "^8.0.0",
+    "@babel/cli": "^7.6.2",
+    "@babel/core": "^7.6.2",
+    "@babel/preset-env": "^7.6.2",
     "browserify": "^14.5.0",
-    "browserify-css": "^0.13.1",
+    "browserify-css": "^0.15.0",
+    "core-js": "^3.2.1",
     "mkdirp": "^0.5.1",
     "node-sass": "^4.6.1",
     "rimraf": "latest",
     "uglify-js": "^3.1.9",
-    "watchify": "^3.9.0"
+    "watchify": "^3.11.1"
   },
   "dependencies": {
+    "@babel/polyfill": "^7.6.0",
     "intro.js": "^2.9.3"
   }
 }
diff --git a/src/js/introduction.js b/src/js/introduction.js
index f299a42..b409c30 100644
--- a/src/js/introduction.js
+++ b/src/js/introduction.js
@@ -102,7 +102,7 @@ function initializeStoryContet($introContainer, params){
         { //7
             element: $(selections.minervaMap)[0]
             , intro: `As you see, the map is quite large. You can navigate through it, and zoom in and out. 
-            Gray rectangles represent molecular pathways, 
+            Coloured rectangles represent molecular pathways, 
             which become transparent if you zoom in close enough. 
             You can also search for specific elements using the left panel.`
             , disableInteraction: settings.disableInteraction
-- 
GitLab