Browse Source

Export using changes in js exporter.

Herbert Vojčík 7 years ago
parent
commit
695c0a730f
2 changed files with 26 additions and 26 deletions
  1. 12 12
      src/Silk-Tests.js
  2. 14 14
      src/Silk.js

+ 12 - 12
src/Silk-Tests.js

@@ -10,16 +10,16 @@ define(["amber/boot"
 if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
-$core.addPackage('Silk-Tests');
+$core.addPackage("Silk-Tests");
 $core.packages["Silk-Tests"].innerEval = function (expr) { return eval(expr); };
 $core.packages["Silk-Tests"].imports = ["amber/jquery/Wrappers-JQuery"];
 $core.packages["Silk-Tests"].transport = {"type":"amd","amdNamespace":"silk"};
 
-$core.addClass('SilkInheritedTest', $globals.DOMiteTest, [], 'Silk-Tests');
+$core.addClass("SilkInheritedTest", $globals.DOMiteTest, [], "Silk-Tests");
 $core.addMethod(
 $core.method({
 selector: "testedClass",
-protocol: 'fixture',
+protocol: "fixture",
 fn: function (){
 var self=this;
 return $globals.Silk;
@@ -36,11 +36,11 @@ $globals.SilkInheritedTest);
 
 
 
-$core.addClass('SilkTest', $globals.TestCase, ['fixtureDiv'], 'Silk-Tests');
+$core.addClass("SilkTest", $globals.TestCase, ["fixtureDiv"], "Silk-Tests");
 $core.addMethod(
 $core.method({
 selector: "assertBodyEndsWith:",
-protocol: 'fixture',
+protocol: "fixture",
 fn: function (aString){
 var self=this;
 var sanitizedBody,sanitizedAssertion;
@@ -81,7 +81,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "assertBodyEndsWithOneOf:",
-protocol: 'fixture',
+protocol: "fixture",
 fn: function (aStringArray){
 var self=this;
 var sanitizedBody,err;
@@ -155,7 +155,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "setUp",
-protocol: 'fixture',
+protocol: "fixture",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -182,7 +182,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "tearDown",
-protocol: 'fixture',
+protocol: "fixture",
 fn: function (){
 var self=this;
 var lastChild;
@@ -214,7 +214,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "testInsertTable",
-protocol: 'testing',
+protocol: "testing",
 fn: function (){
 var self=this;
 var d,tbl;
@@ -268,7 +268,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "testInsertTable2",
-protocol: 'testing',
+protocol: "testing",
 fn: function (){
 var self=this;
 var d,tbl;
@@ -324,7 +324,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "testNestedDIVsWithAttributes",
-protocol: 'testing',
+protocol: "testing",
 fn: function (){
 var self=this;
 var s;
@@ -406,7 +406,7 @@ $globals.SilkTest);
 $core.addMethod(
 $core.method({
 selector: "testOnClickEvent",
-protocol: 'testing',
+protocol: "testing",
 fn: function (){
 var self=this;
 var s,para;

+ 14 - 14
src/Silk.js

@@ -2,18 +2,18 @@ define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Infras
 if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
-$core.addPackage('Silk');
+$core.addPackage("Silk");
 $core.packages["Silk"].innerEval = function (expr) { return eval(expr); };
 $core.packages["Silk"].transport = {"type":"amd","amdNamespace":"silk"};
 
-$core.addClass('Silk', $globals.Domite, [], 'Silk');
+$core.addClass("Silk", $globals.Domite, [], "Silk");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Silk.comment="I am subclass of `Domite` with more convenient high-level API.\x0a\x0a##Rendering\x0a\x0a - `aSilk << anObject` uses double-dispatch via `renderOnSilk:`.\x0aThis allows to create widgets\x0a(no formal superclass, anything with `renderOnSilk:` is a widget),\x0aas well as incorporating magic on certain types of objects:\x0a   - blocks: `aSilk << aBlock` runs the block, passing aSilk as a parameter.\x0a   - associations: `aSilk << (key -> value)` set attribute key to value.\x0a\x0aWorthful to note is, rendering a collection has its magic\x0aalready built-in (via `putOn:`) -- if you `stream << aCollection`,\x0aits items are `<<`'d in sequence.\x0aSo, de facto, arrays are deeply flattened when put on a stream via `<<`.\x0a\x0a##Convenience\x0a\x0a - `aCssSelectorString asSilk` returns Silk wrapping an element at a selector.\x0a - `anObject inSilk` returns anObject rendered in a document fragment.\x0a\x0a##Element creation\x0a\x0aThese messages use DNU to dynamically create\x0aelements with any (letters-and-numbers) tag name,\x0aNext samples show this on an example of `<div>`.\x0a\x0a - `Silk DIV` is shortcut for `Silk newElement: 'div'`.\x0a - `aSilk DIV` is shortcut for\x0a`[ |tmp| tmp := Silk DIV. aSilk << tmp. tmp] value`.\x0aIOW, it not just creates the element and returns it,\x0abut also puts in on aSilk.\x0a - `aSilk DIV: anObject` is shortcut for\x0a`aSilk DIV << anObject; yourself`.\x0aIOW, it not just creates and inserts the element,\x0abut puts a content into it.\x0a\x0a##Conclusions\x0a\x0aTaken all this together, one can do pretty neat constructs:\x0a\x0a```\x0a  aSilk P: { 'id'->'mission'. 'We are the champions.' }\x0a```\x0a\x0aadds `<p id=\x22mission\x22>We are the champions.</p>` into `aSilk`\x0aand returns the Silk-wrapped `<p>` with insertion cursor at the end.";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
 selector: "doesNotUnderstand:",
-protocol: 'writing',
+protocol: "writing",
 fn: function (aMessage){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -54,7 +54,7 @@ $globals.Silk);
 $core.addMethod(
 $core.method({
 selector: "nextPut:",
-protocol: 'writing',
+protocol: "writing",
 fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -92,7 +92,7 @@ $globals.Silk);
 $core.addMethod(
 $core.method({
 selector: "doesNotUnderstand:",
-protocol: 'message handling',
+protocol: "message handling",
 fn: function (aMessage){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -128,7 +128,7 @@ $globals.Silk.klass);
 $core.addMethod(
 $core.method({
 selector: "tryMakeDnuElement:",
-protocol: 'instance creation',
+protocol: "instance creation",
 fn: function (aMessage){
 var self=this;
 var selector,newElement,useArg;
@@ -180,7 +180,7 @@ $globals.Silk.klass);
 $core.addMethod(
 $core.method({
 selector: "renderOnSilk:",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (aSilk){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -204,7 +204,7 @@ $globals.Association);
 $core.addMethod(
 $core.method({
 selector: "renderOnSilk:",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (aSilk){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -228,7 +228,7 @@ $globals.BlockClosure);
 $core.addMethod(
 $core.method({
 selector: "asSilk",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -251,7 +251,7 @@ $globals.CharacterArray);
 $core.addMethod(
 $core.method({
 selector: "inSilk",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -277,7 +277,7 @@ $globals.JSObjectProxy);
 $core.addMethod(
 $core.method({
 selector: "renderOnSilk:",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (aSilk){
 var self=this;
 return nil;
@@ -295,7 +295,7 @@ $globals.JSObjectProxy);
 $core.addMethod(
 $core.method({
 selector: "inSilk",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -321,7 +321,7 @@ $globals.Object);
 $core.addMethod(
 $core.method({
 selector: "renderOnSilk:",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (aSilk){
 var self=this;
 return nil;
@@ -339,7 +339,7 @@ $globals.Object);
 $core.addMethod(
 $core.method({
 selector: "attrPut:on:",
-protocol: '*Silk',
+protocol: "*Silk",
 fn: function (anObject,aSilk){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);