index.html 2.0 KB

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