Browse Source

separate codemirrors in amber and helios:

 - as they use old version (3.x), use name codemirror3;
 - they both have their own codemirror3.amd.json;
 - they both load pieces of CM locally, no reuse;
 - legacy IDE not loaded into Helios window - to promote
   CodeMirror upgrade and preventing clashes.
Herbert Vojčík 9 years ago
parent
commit
5b22a5911b
3 changed files with 23 additions and 3 deletions
  1. 6 2
      app.js
  2. 1 1
      bower.json
  3. 16 0
      codemirror3.amd.json

+ 6 - 2
app.js

@@ -2,9 +2,13 @@ define([
 	'amber/helpers', // pre-fetch, dep of amber/deploy
 	'amber/deploy', // pre-fetch, dep of amber/lang
 	'amber/lang',
-	'amber/codemirror',
+    'codemirror3/lib/codemirror',
+    'codemirror3/mode/smalltalk/smalltalk',
+    'codemirror3/addon/hint/show-hint',
+    'css!codemirror3/theme/ambiance',
+    'css!codemirror3/lib/codemirror',
+    'css!codemirror3/addon/hint/show-hint',
     'jquery-ui',
-    'amber_core/IDE',
     'amber_core/Examples',
     'amber_core/Benchfib',
     'bootstrap2.3.2/js/bootstrap',

+ 1 - 1
bower.json

@@ -13,7 +13,7 @@
     "jquery": ">=1.7.0",
     "jquery-ui": ">=1.9.2",
     "bootstrap2.3.2": "^2.3.2",
-    "codemirror": "^3.24.0",
+    "codemirror3": "codemirror#^3.24.0",
     "showdown": "^0.3.1"
   }
 }

+ 16 - 0
codemirror3.amd.json

@@ -0,0 +1,16 @@
+{
+    "paths": {
+        "codemirror3": "."
+    },
+    "shim": {
+        "codemirror3/lib/codemirror": {
+            "deps": [ "css!codemirror3/lib/codemirror" ]
+        },
+        "codemirror3/mode/smalltalk/smalltalk": {
+            "deps": [ "../../lib/codemirror" ]
+        },
+        "codemirror3/addon/hint/show-hint": {
+            "deps": [ "../../lib/codemirror" ]
+        }
+    }
+}