Browse Source

smalltalk and nil 'modulized', used in index.html

Herbert Vojčík 10 years ago
parent
commit
4988c3ca22
2 changed files with 10 additions and 3 deletions
  1. 3 3
      index.html
  2. 7 0
      js/lib/amber-in-browser.js

+ 3 - 3
index.html

@@ -5,15 +5,15 @@
     <title>Amber Smalltalk</title>
     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     <meta name="author" content="Nicolas Petton"/>
-    <script type='text/javascript' src='js/lib/require.min.js'></script>
     <script type='text/javascript' src='js/lib/amber-in-browser.js'></script>
+    <script type='text/javascript' src='js/lib/require.min.js'></script>
 </head>
 
 <body>
 <script type='text/javascript'>
     require(
-            ["amber-full-devel"],
-            function () {
+            ["smalltalk", "amber-full-devel"],
+            function (smalltalk) {
                 smalltalk.initialize();
 
                 smalltalk.Browser._open()

+ 7 - 0
js/lib/amber-in-browser.js

@@ -35,6 +35,13 @@ require = function (require) {
             },
             'CodeMirror/addon/hint/show-hint': {
                 deps: [ 'CodeMirror/codemirror']
+            },
+            'smalltalk': {
+                exports: 'smalltalk'
+            },
+            'nil': {
+                deps: [ 'smalltalk' ],
+                exports: 'nil'
             }
         },
         deps: [