1
0

index.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html>
  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. <p id="loading">Loading Amber for development ...</p>
  12. <p id="startlegacy">To start legacy in-page IDE, <a href="#" onclick="require('amber/helpers').globals.Browser._open(); return false;">click here</a>.</p>
  13. <p id="starthelios">To popup Helios IDE, <a href="#" onclick="require('amber/helpers').popupHelios(); return false;">click here</a>.</p>
  14. <script type='text/javascript'>
  15. var startLegacy = document.getElementById("startlegacy");
  16. startLegacy.parentNode.removeChild(startLegacy);
  17. var startHelios = document.getElementById("starthelios");
  18. startHelios.parentNode.removeChild(startHelios);
  19. var global = typeof global === "undefined" ? window : global || window;
  20. require(["require", "amber/es2015-polyfills"], function (require) {
  21. var loadHelpers = new Promise(function (resolve, reject) {
  22. setTimeout(function () {
  23. require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
  24. }, 250);
  25. });
  26. require(["amber/devel", "amber_core/Platform-Browser"], function (amber) {
  27. loadHelpers
  28. .then(function () {
  29. return amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
  30. })
  31. .then(function () {
  32. var loading = document.getElementById("loading");
  33. loading.parentNode.appendChild(startLegacy);
  34. loading.parentNode.appendChild(startHelios);
  35. loading.parentNode.removeChild(loading);
  36. });
  37. });
  38. });
  39. </script>
  40. </body>
  41. </html>