Browse Source

Rename Apps. Bump amber to >=0.20.0.

Herbert Vojčík 9 months ago
parent
commit
655801d6a0

+ 3 - 3
bower.json

@@ -29,9 +29,9 @@
   ],
   "private": false,
   "dependencies": {
-    "amber": "^0.19.1",
+    "amber": ">=0.20.0",
     "amber-compat-es2015": "^0.1.5",
-    "axxord0": "^0.1.0",
+    "axxord": "axxord0#>=0.3.0",
     "xontent": "^0.1.0"
   },
   "devDependencies": {
@@ -39,4 +39,4 @@
     "amber-ide-starter-dialog": "^0.1.0",
     "helios": "^0.8.0"
   }
-}
+}

+ 1 - 1
example-counter/counter.html

@@ -25,7 +25,7 @@
                     require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
 
                     $(function () {
-                        amber.globals.App._start();
+                        amber.globals.CounterApp._start();
                     });
                 });
             });

+ 8 - 10
example-counter/src/Trapped-Counter.js

@@ -7,16 +7,14 @@ define(["amber/boot"
 
 //>>excludeEnd("imports");
 ){"use strict";
-if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
 $core.addPackage("Trapped-Counter");
-$core.packages["Trapped-Counter"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Trapped-Counter"].imports = ["trapped/Trapped-Processors"];
-$core.packages["Trapped-Counter"].transport = {"type":"amd","amdNamespace":"trapped-counter"};
+($core.packageDescriptors||$core.packages)["Trapped-Counter"].innerEval = function (expr) { return eval(expr); };
+($core.packageDescriptors||$core.packages)["Trapped-Counter"].imports = ["trapped/Trapped-Processors"];
+($core.packageDescriptors||$core.packages)["Trapped-Counter"].transport = {"type":"amd","amdNamespace":"trapped-counter"};
 
-$core.addClass("App", $globals.Object, [], "Trapped-Counter");
+$core.addClass("CounterApp", $globals.Object, [], "Trapped-Counter");
 $core.addMethod(
 $core.method({
 selector: "start",
@@ -35,7 +33,7 @@ $recv(model)._axxord_($recv($globals.SimpleAxon)._new());
 $recv($globals.Trapped)._start_([model]);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"start",{model:model},$globals.App)});
+}, function($ctx1) {$ctx1.fill(self,"start",{model:model},$globals.CounterApp)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -45,7 +43,7 @@ referencedClasses: ["TrappedCounter", "SimpleAxon", "Trapped"],
 //>>excludeEnd("ide");
 messageSends: ["new", "axxord:", "start:"]
 }),
-$globals.App);
+$globals.CounterApp);
 
 
 $core.addMethod(
@@ -59,7 +57,7 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 return $recv($self._new())._start();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.App.a$cls)});
+}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.CounterApp.a$cls)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -69,7 +67,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["start", "new"]
 }),
-$globals.App.a$cls);
+$globals.CounterApp.a$cls);
 
 
 $core.addClass("TrappedCounter", $globals.Object, ["value"], "Trapped-Counter");

+ 4 - 4
example-counter/src/Trapped-Counter.st

@@ -1,10 +1,10 @@
 Smalltalk createPackage: 'Trapped-Counter'!
-(Smalltalk packageAt: 'Trapped-Counter') imports: {'trapped/Trapped-Processors'}!
-Object subclass: #App
+(Smalltalk packageAt: 'Trapped-Counter' ifAbsent: [ self error: 'Package not created: Trapped-Counter' ]) imports: {'trapped/Trapped-Processors'}!
+Object subclass: #CounterApp
 	instanceVariableNames: ''
 	package: 'Trapped-Counter'!
 
-!App methodsFor: 'startup'!
+!CounterApp methodsFor: 'startup'!
 
 start
 	| model |
@@ -13,7 +13,7 @@ start
 	Trapped start: { model }
 ! !
 
-!App class methodsFor: 'startup'!
+!CounterApp class methodsFor: 'startup'!
 
 start
 	^ self new start

+ 8 - 10
example-todo/src/Trapped-Todo.js

@@ -7,16 +7,14 @@ define(["amber/boot"
 
 //>>excludeEnd("imports");
 ){"use strict";
-if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
 $core.addPackage("Trapped-Todo");
-$core.packages["Trapped-Todo"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Trapped-Todo"].imports = ["trapped/Trapped-Processors"];
-$core.packages["Trapped-Todo"].transport = {"type":"amd","amdNamespace":"trapped-todo"};
+($core.packageDescriptors||$core.packages)["Trapped-Todo"].innerEval = function (expr) { return eval(expr); };
+($core.packageDescriptors||$core.packages)["Trapped-Todo"].imports = ["trapped/Trapped-Processors"];
+($core.packageDescriptors||$core.packages)["Trapped-Todo"].transport = {"type":"amd","amdNamespace":"trapped-todo"};
 
-$core.addClass("App", $globals.Object, [], "Trapped-Todo");
+$core.addClass("TodoApp", $globals.Object, [], "Trapped-Todo");
 $core.addMethod(
 $core.method({
 selector: "start",
@@ -59,7 +57,7 @@ $recv(model)._axxord_(axon);
 $recv($globals.Trapped)._start_([model]);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"start",{model:model,axon:axon},$globals.App)});
+}, function($ctx1) {$ctx1.fill(self,"start",{model:model,axon:axon},$globals.TodoApp)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -69,7 +67,7 @@ referencedClasses: ["Axolator", "TrappedTodo", "SimpleAxon", "TrappedPosition",
 //>>excludeEnd("ide");
 messageSends: ["on:", "new", "addInterest:", "interestOn:block:", "changed:", "valueWithTimeout:", "axes:transform:", "axxord:", "start:"]
 }),
-$globals.App);
+$globals.TodoApp);
 
 
 $core.addMethod(
@@ -83,7 +81,7 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 return $recv($self._new())._start();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.App.a$cls)});
+}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.TodoApp.a$cls)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -93,7 +91,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["start", "new"]
 }),
-$globals.App.a$cls);
+$globals.TodoApp.a$cls);
 
 
 $core.addClass("TrappedTodo", $globals.Object, ["title", "todos", "todoText"], "Trapped-Todo");

+ 4 - 4
example-todo/src/Trapped-Todo.st

@@ -1,10 +1,10 @@
 Smalltalk createPackage: 'Trapped-Todo'!
-(Smalltalk packageAt: 'Trapped-Todo') imports: {'trapped/Trapped-Processors'}!
-Object subclass: #App
+(Smalltalk packageAt: 'Trapped-Todo' ifAbsent: [ self error: 'Package not created: Trapped-Todo' ]) imports: {'trapped/Trapped-Processors'}!
+Object subclass: #TodoApp
 	instanceVariableNames: ''
 	package: 'Trapped-Todo'!
 
-!App methodsFor: 'startup'!
+!TodoApp methodsFor: 'startup'!
 
 start
 	| model axon |
@@ -24,7 +24,7 @@ start
 	Trapped start: { model }
 ! !
 
-!App class methodsFor: 'startup'!
+!TodoApp class methodsFor: 'startup'!
 
 start
 	^ self new start

+ 1 - 1
example-todo/todo.html

@@ -23,7 +23,7 @@
                     require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
 
                     $(function () {
-                        amber.globals.App._start();
+                        amber.globals.TodoApp._start();
                     });
                 });
             });

+ 3 - 5
src/Trapped-Processors.js

@@ -7,14 +7,12 @@ define(["amber/boot"
 
 //>>excludeEnd("imports");
 ){"use strict";
-if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
 $core.addPackage("Trapped-Processors");
-$core.packages["Trapped-Processors"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Trapped-Processors"].imports = ["amber/jquery/Wrappers-JQuery", "jquery.xontent"];
-$core.packages["Trapped-Processors"].transport = {"type":"amd","amdNamespace":"trapped"};
+($core.packageDescriptors||$core.packages)["Trapped-Processors"].innerEval = function (expr) { return eval(expr); };
+($core.packageDescriptors||$core.packages)["Trapped-Processors"].imports = ["amber/jquery/Wrappers-JQuery", "jquery.xontent"];
+($core.packageDescriptors||$core.packages)["Trapped-Processors"].transport = {"type":"amd","amdNamespace":"trapped"};
 
 $core.addClass("TrappedProcessorAttribute", $globals.TrappedDataExpectingProcessor, ["attrName"], "Trapped-Processors");
 //>>excludeStart("ide", pragmas.excludeIdeData);

+ 1 - 1
src/Trapped-Processors.st

@@ -1,5 +1,5 @@
 Smalltalk createPackage: 'Trapped-Processors'!
-(Smalltalk packageAt: 'Trapped-Processors') imports: {'amber/jquery/Wrappers-JQuery'. 'jquery.xontent'}!
+(Smalltalk packageAt: 'Trapped-Processors' ifAbsent: [ self error: 'Package not created: Trapped-Processors' ]) imports: {'amber/jquery/Wrappers-JQuery'. 'jquery.xontent'}!
 TrappedDataExpectingProcessor subclass: #TrappedProcessorAttribute
 	instanceVariableNames: 'attrName'
 	package: 'Trapped-Processors'!

+ 3 - 5
src/Trapped.js

@@ -7,14 +7,12 @@ define(["amber/boot"
 
 //>>excludeEnd("imports");
 ){"use strict";
-if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
 $core.addPackage("Trapped");
-$core.packages["Trapped"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Trapped"].imports = ["amber/web/Web"];
-$core.packages["Trapped"].transport = {"type":"amd","amdNamespace":"trapped"};
+($core.packageDescriptors||$core.packages)["Trapped"].innerEval = function (expr) { return eval(expr); };
+($core.packageDescriptors||$core.packages)["Trapped"].imports = ["amber/web/Web"];
+($core.packageDescriptors||$core.packages)["Trapped"].transport = {"type":"amd","amdNamespace":"trapped"};
 
 $core.addClass("TrappedDataCarrier", $globals.Object, ["target", "model", "chain"], "Trapped");
 $core.addMethod(

+ 1 - 1
src/Trapped.st

@@ -1,5 +1,5 @@
 Smalltalk createPackage: 'Trapped'!
-(Smalltalk packageAt: 'Trapped') imports: {'amber/web/Web'}!
+(Smalltalk packageAt: 'Trapped' ifAbsent: [ self error: 'Package not created: Trapped' ]) imports: {'amber/web/Web'}!
 Object subclass: #TrappedDataCarrier
 	instanceVariableNames: 'target model chain'
 	package: 'Trapped'!