Browse Source

Don't define amber/Platform, load pkg explicitly.

Herbert Vojčík 7 years ago
parent
commit
f370528268
3 changed files with 5 additions and 7 deletions
  1. 5 5
      root/Gruntfile.js
  2. 0 1
      root/config-browser.js
  3. 0 1
      root/config-node.js

+ 5 - 5
root/Gruntfile.js

@@ -52,8 +52,8 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     rawText: {
                         "amber/compatibility": "/*stub*/",
-                        "amber/Platform": "/*stub*/",
-                        "app": 'define(["deploy"],function(x){return x});'
+                        "amber/Platform": "define()", //eg. nothing, TODO remove
+                        "app": 'define(["deploy", "amber_core/Platform-Browser"],function(x){return x});'
                     },
                     pragmas: {
                         excludeIdeData: true,
@@ -69,8 +69,8 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     rawText: {
                         "amber/compatibility": "/*stub*/",
-                        "amber/Platform": "/*stub*/",
-                        "app": 'define(["devel"],function(x){return x});'
+                        "amber/Platform": "define()", //eg. nothing, TODO remove
+                        "app": 'define(["devel", "amber_core/Platform-Browser"],function(x){return x});'
                     },
                     include: ['config', 'config-browser', 'node_modules/requirejs/require', 'app'],
                     exclude: ['devel'],
@@ -82,7 +82,7 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     rawText: {
                         "app": "(" + function () {
-                            define(["testing", "amber_devkit/NodeTestRunner"], function (amber) {
+                            define(["testing", "amber_core/Platform-Node", "amber_devkit/NodeTestRunner"], function (amber) {
                                 amber.initialize().then(function () {
                                     amber.globals.NodeTestRunner._main();
                                 });

+ 0 - 1
root/config-browser.js

@@ -1,2 +1 @@
-define("amber/Platform", ["amber_core/Platform-Browser"], {});
 define("amber/compatibility", ["amber/browser-compatibility"], {});

+ 0 - 1
root/config-node.js

@@ -2,6 +2,5 @@
 // when building an app to run in node.js.
 // Free to edit. You can break tests (cli test runner uses
 // this to build itself - it is a node executable).
-define("amber/Platform", ["amber_core/Platform-Node"], {});
 define("amber/compatibility", ["amber/node-compatibility"], {});
 define("jquery", {});