1
0

index.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Amber Smalltalk</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  6. <meta name="author" content="Nicolas Petton"/>
  7. <script type='text/javascript' src='node_modules/requirejs/require.js'></script>
  8. <script type='text/javascript' src='config.js'></script>
  9. </head>
  10. <body>
  11. <div>
  12. <button id="startlegacy" disabled type="button"
  13. onclick="a$cb$(function (amber) {amber.globals.Browser._open();});">
  14. Start legacy in-page IDE
  15. </button>
  16. <button id="starthelios" disabled type="button"
  17. onclick="a$cb$(function (amber) {amber.popupHelios();});">
  18. Popup Helios IDE
  19. </button>
  20. </div>
  21. <div>
  22. <span id="loadingKernel">Loading Amber kernel ... </span>
  23. <span id="initializingKernel">initializing Amber kernel ... </span>
  24. <span id="loadingIdeSupport">loading IDE support ... </span>
  25. <span id="loadingTheRest">loading rest of development image ... </span>
  26. <span id="done">done.</span>
  27. </div>
  28. <script type='text/javascript'>
  29. "use strict";
  30. var global = typeof global === "undefined" ? window : global || window;
  31. var a$cb$;
  32. (function () {
  33. var startLegacy = document.getElementById("startlegacy");
  34. var startHelios = document.getElementById("starthelios");
  35. var messageBox = document.getElementById("loadingKernel").parentNode;
  36. var initializingKernel = messageBox.removeChild(document.getElementById("initializingKernel"));
  37. var loadingIdeSupport = messageBox.removeChild(document.getElementById("loadingIdeSupport"));
  38. var loadingTheRest = messageBox.removeChild(document.getElementById("loadingTheRest"));
  39. var done = messageBox.removeChild(document.getElementById("done"));
  40. require(["require", "amber/es6-promise"], function (require, promiseLib) {
  41. promiseLib.polyfill();
  42. require(["amber/boot", "amber/deploy", "amber_core/Platform-Browser"], function (_, amber) {
  43. messageBox.appendChild(initializingKernel);
  44. amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
  45. .then(function () {
  46. messageBox.appendChild(loadingIdeSupport);
  47. return new Promise(function (resolve, reject) {
  48. require(["amber/lang", "amber/legacy/IDE", "amber_core/SUnit"], resolve, reject);
  49. });
  50. })
  51. .then(function () {
  52. amber.globals.Smalltalk._postLoad();
  53. a$cb$ = function (action) {
  54. action(amber);
  55. };
  56. startLegacy.disabled = startHelios.disabled = false;
  57. messageBox.appendChild(loadingTheRest);
  58. return new Promise(function (resolve, reject) {
  59. require(["amber/devel", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
  60. });
  61. })
  62. .then(function () {
  63. amber.globals.Smalltalk._postLoad();
  64. messageBox.appendChild(done);
  65. });
  66. });
  67. });
  68. })();
  69. </script>
  70. </body>
  71. </html>