Browse Source

libs: amber_core => amber/core in deps

+ forgotten previous transformations for tests
Herby Vojčík 2 years ago
parent
commit
1f8faddec6
6 changed files with 15 additions and 16 deletions
  1. 5 5
      Gruntfile.js
  2. 1 1
      package.json
  3. 4 5
      src/DOMite-Tests.js
  4. 3 3
      src/DOMite.js
  5. 1 1
      src/DOMite.st
  6. 1 1
      testing.js

+ 5 - 5
Gruntfile.js

@@ -59,7 +59,7 @@ module.exports = function (grunt) {
                     'src/DOMite-Tests.st' // list all tests in dependency order
                 ],
                 amd_namespace: 'domite',
-                libraries: ['amber_core/SUnit']
+                libraries: ['amber/core/SUnit']
             }
         },
 
@@ -74,7 +74,7 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     rawText: {
                         "app": '(' + polyfillThenPromiseApp + '());',
-                        "__app__": 'define(["deploy", "amber_core/Platform-Browser"],function(x){return x});'
+                        "__app__": 'define(["deploy", "amber/core/Platform-Browser"],function(x){return x});'
                     },
                     pragmas: {
                         excludeIdeData: true,
@@ -91,10 +91,10 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     rawText: {
                         "app": '(' + polyfillThenPromiseApp + '());',
-                        "__app__": 'define(["devel", "amber_core/Platform-Browser"],function(x){return x});'
+                        "__app__": 'define(["devel", "amber/core/Platform-Browser"],function(x){return x});'
                     },
                     include: ['config', 'node_modules/requirejs/require', 'app', '__app__'],
-                    exclude: ['devel', 'amber_core/Platform-Browser'],
+                    exclude: ['devel', 'amber/core/Platform-Browser'],
                     out: "the.js"
                 }
             },
@@ -104,7 +104,7 @@ module.exports = function (grunt) {
                     rawText: {
                         "jquery": "/* do not load in node test runner */",
                         "__app__": "(" + function () {
-                            define(["testing", "amber_core/Platform-Node", "amber_devkit/NodeTestRunner"], function (amber) {
+                            define(["testing", "amber/core/Platform-Node", "amber_devkit/NodeTestRunner"], function (amber) {
                                 amber.initialize().then(function () {
                                     amber.globals.NodeTestRunner._main();
                                 });

+ 1 - 1
package.json

@@ -31,7 +31,7 @@
     "test": "grunt test"
   },
   "dependencies": {
-    "@ambers/lang": ">=0.22.6"
+    "@ambers/lang": ">0.22.6"
   },
   "devDependencies": {
     "@ambers/contrib-legacy": ">=0.7.1",

+ 4 - 5
src/DOMite-Tests.js

@@ -1,9 +1,8 @@
-define(["amber/boot", "amber_core/SUnit"], function($boot){"use strict";
-if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
+define(["amber/boot", "require", "amber/core/SUnit"], function($boot,requirejs){"use strict";
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-$core.addPackage("DOMite-Tests");
-($core.packageDescriptors||$core.packages)["DOMite-Tests"].innerEval = function (expr) { return eval(expr); };
-($core.packageDescriptors||$core.packages)["DOMite-Tests"].transport = {"type":"amd","amdNamespace":"domite"};
+var $pkg = $core.addPackage("DOMite-Tests");
+$pkg.innerEval = function (expr) { return eval(expr); };
+$pkg.transport = {"type":"amd","amdNamespace":"domite"};
 
 $core.addClass("DOMiteTest", $globals.TestCase, ["fixtureDiv"], "DOMite-Tests");
 $core.addMethod(

+ 3 - 3
src/DOMite.js

@@ -1,10 +1,10 @@
-define(["amber/boot", "require", "amber_core/Kernel-Collections"], function($boot,requirejs){"use strict";
+define(["amber/boot", "require", "amber/core/Kernel-Collections"], function($boot,requirejs){"use strict";
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 var $pkg = $core.addPackage("DOMite");
 $pkg.innerEval = function (expr) { return eval(expr); };
-$pkg.imports = ["amber_core/Platform-DOM"];
+$pkg.imports = ["amber/core/Platform-DOM"];
 //>>excludeStart("imports", pragmas.excludeImports);
-$pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber_core/Platform-DOM"], function () {resolve();}, reject); });
+$pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber/core/Platform-DOM"], function () {resolve();}, reject); });
 //>>excludeEnd("imports");
 $pkg.transport = {"type":"amd","amdNamespace":"domite"};
 

+ 1 - 1
src/DOMite.st

@@ -1,5 +1,5 @@
 Smalltalk createPackage: 'DOMite'!
-(Smalltalk packageAt: 'DOMite' ifAbsent: [ self error: 'Package not created: DOMite' ]) imports: {'amber_core/Platform-DOM'}!
+(Smalltalk packageAt: 'DOMite' ifAbsent: [ self error: 'Package not created: DOMite' ]) imports: {'amber/core/Platform-DOM'}!
 ProtoStream subclass: #Domite
 	instanceVariableNames: 'element reference'
 	package: 'DOMite'!

+ 1 - 1
testing.js

@@ -1,6 +1,6 @@
 define([
     './deploy',
-    'amber_core/SUnit',
+    'amber/core/SUnit',
     // --- packages used only during automated testing begin here ---
     'domite/DOMite-Tests'
     // --- packages used only during automated testing end here ---