2
0

index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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>
  8. var require = {
  9. baseUrl: "..",
  10. map: {"*": {
  11. "amber/Platform": "amber/devel", //eg. nothing, TODO remove
  12. "amber/compatibility": "amber/devel" //eg. nothing, TODO remove
  13. }}
  14. };
  15. </script>
  16. <script type='text/javascript' src='../node_modules/requirejs/require.js'></script>
  17. <script type='text/javascript' src='../config.js'></script>
  18. </head>
  19. <body>
  20. <p id="loading">Loading Amber for development ...</p>
  21. <p id="startlegacy">To start legacy in-page IDE, <a href="#" onclick="require('amber/helpers').globals.Browser._open(); return false;">click here</a>.</p>
  22. <p id="starthelios">To popup Helios IDE, <a href="#" onclick="require('amber/helpers').popupHelios(); return false;">click here</a>.</p>
  23. <script type='text/javascript'>
  24. var startLegacy = document.getElementById("startlegacy");
  25. startLegacy.parentNode.removeChild(startLegacy);
  26. var startHelios = document.getElementById("starthelios");
  27. startHelios.parentNode.removeChild(startHelios);
  28. require(["require", "amber/es2015-polyfills"], function (require) {
  29. var loadHelpers = new Promise(function (resolve, reject) {
  30. setTimeout(function () {
  31. require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
  32. }, 250);
  33. });
  34. require(["amber/devel", "amber_core/Platform-Browser"], function (amber) {
  35. loadHelpers
  36. .then(function () {
  37. return amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
  38. })
  39. .then(function () {
  40. var loading = document.getElementById("loading");
  41. loading.parentNode.appendChild(startLegacy);
  42. loading.parentNode.appendChild(startHelios);
  43. loading.parentNode.removeChild(loading);
  44. });
  45. });
  46. });
  47. </script>
  48. </body>
  49. </html>