Browse Source

Direct setting default amd namespace

Herbert Vojčík 11 years ago
parent
commit
257868a1fa
3 changed files with 6 additions and 18 deletions
  1. 1 7
      helios.html
  2. 1 7
      index.html
  3. 4 4
      support/smalltalk.js

+ 1 - 7
helios.html

@@ -13,13 +13,6 @@
       <script type='text/javascript' src='support/amber.js'></script>
       <script type='text/javascript' src='support/requirejs/require.min.js'></script>
       <script type='text/javascript'>
-          require.config({
-              config: {
-                  'amber_vm/smalltalk': {
-                      defaultNamespace: 'amber_core'
-                  }
-              }
-          });
           require(
                   ["amber_vm/smalltalk", "amber_set/full-devel-helios"],
                   function (smalltalk) {
@@ -27,6 +20,7 @@
                           return 'Do you want to close Amber? All uncommitted changes will be lost.';
                       };
 
+                      smalltalk.defaultAMDNamespace = "amber_core";
                       smalltalk.initialize();
                   }
           );

+ 1 - 7
index.html

@@ -11,16 +11,10 @@
 
 <body>
 <script type='text/javascript'>
-    require.config({
-        config: {
-            'amber_vm/smalltalk': {
-                defaultNamespace: 'amber_core'
-            }
-        }
-    });
     require(
         ["amber_vm/smalltalk", "amber_set/full-devel"],
         function (smalltalk) {
+            smalltalk.defaultAMDNamespace = "amber_core";
             smalltalk.initialize();
 
             smalltalk.Browser._open()

+ 4 - 4
support/smalltalk.js

@@ -1,10 +1,10 @@
 define("amber_vm/smalltalk", ["require", "module", "./boot"], function (require, module, boot) {
     var smalltalk = boot.smalltalk;
 	smalltalk.amdRequire = require;
-    var config = module.config && module.config();
-    if (config) {
-		smalltalk.defaultAMDNamespace = config.defaultNamespace;
-    }
+//    var config = module.config && module.config();
+//    if (config) {
+//		smalltalk.defaultAMDNamespace = config.defaultNamespace;
+//    }
     return  smalltalk;
 });