1
0

index.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/es6-promise"], function (require, promiseLib) {
  21. promiseLib.polyfill();
  22. var loadHelpers = new Promise(function (resolve, reject) {
  23. setTimeout(function () {
  24. require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
  25. }, 250);
  26. });
  27. require(["amber/devel", "amber_core/Platform-Browser"], function (amber) {
  28. loadHelpers
  29. .then(function () {
  30. return amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
  31. })
  32. .then(function () {
  33. var loading = document.getElementById("loading");
  34. loading.parentNode.appendChild(startLegacy);
  35. loading.parentNode.appendChild(startHelios);
  36. loading.parentNode.removeChild(loading);
  37. });
  38. });
  39. });
  40. </script>
  41. </body>
  42. </html>