Browse Source

Not generating .js files from templates.

`grunt` is run always anyway and it's hard to maintain them
(the format of those .js templates for way old).
Herby Vojčík 5 years ago
parent
commit
9109c7d11f
4 changed files with 1 additions and 200 deletions
  1. 0 2
      rename.json
  2. 0 187
      root/src/name.js
  3. 0 10
      root/src/test.js
  4. 1 1
      template.js

+ 0 - 2
rename.json

@@ -1,8 +1,6 @@
 {
   "gitignore-file": ".gitignore",
   "localamdjson-file": "local.amd.json",
-  "src/name.js": "src/{%= name %}.js",
   "src/name.st": "src/{%= name %}.st",
-  "src/test.js": "src/{%= name %}-Tests.js",
   "src/test.st": "src/{%= name %}-Tests.st"
 }

+ 0 - 187
root/src/name.js

@@ -1,187 +0,0 @@
-define("{%= namespace %}/{%= name %}", ["amber/boot"
-//>>excludeStart("imports", pragmas.excludeImports);
-, "amber/jquery/Wrappers-JQuery", "amber/web/Web", "silk/Silk"
-//>>excludeEnd("imports");
-, "amber_core/Kernel-Objects"], function($boot
-//>>excludeStart("imports", pragmas.excludeImports);
-
-//>>excludeEnd("imports");
-){
-if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
-var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-$core.addPackage('{%= name %}');
-($core.packageDescriptors||$core.packages)["{%= name %}"].innerEval = function (expr) { return eval(expr); };
-($core.packageDescriptors||$core.packages)["{%= name %}"].imports = ["amber/jquery/Wrappers-JQuery", "amber/web/Web", "silk/Silk"];
-($core.packageDescriptors||$core.packages)["{%= name %}"].transport = {"type":"amd","amdNamespace":"{%= namespace %}"};
-
-$core.addClass('{%= name %}', $globals.Object, [], '{%= name %}');
-$core.addMethod(
-$core.method({
-selector: "augmentPage",
-protocol: 'starting',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1="#amber-with"._asJQuery();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["asJQuery"]=1;
-//>>excludeEnd("ctx");
-$recv($1)._click_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._doAmberWith();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["click:"]=1;
-//>>excludeEnd("ctx");
-$recv("#silk-tag"._asSilk())._on_bind_("click",(function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._doSilkTAG();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
-$recv("#jquery-append"._asJQuery())._click_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._doJQueryAppend();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
-//>>excludeEnd("ctx");
-}));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"augmentPage",{},$globals.{%= name %})});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "augmentPage\x0a\x09'#amber-with' asJQuery click: [ self doAmberWith ].\x0a\x09'#silk-tag' asSilk on: #click bind: [ self doSilkTAG ].\x0a\x09'#jquery-append' asJQuery click: [ self doJQueryAppend ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["click:", "asJQuery", "doAmberWith", "on:bind:", "asSilk", "doSilkTAG", "doJQueryAppend"]
-}),
-$globals.{%= name %});
-
-$core.addMethod(
-$core.method({
-selector: "doAmberWith",
-protocol: 'action',
-fn: function (){
-var self=this;
-var tag;
-function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-tag=$recv($recv($HTMLCanvas())._onJQuery_("#output-list"._asJQuery()))._root();
-$recv(tag)._with_((function(html){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($recv(html)._li())._with_("Amber Web #with: added me!");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["with:"]=1;
-//>>excludeEnd("ctx");
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"doAmberWith",{tag:tag},$globals.{%= name %})});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "doAmberWith\x0a\x09| tag |\x0a\x09tag := (HTMLCanvas onJQuery: '#output-list' asJQuery) root.\x0a\x09tag with: [ :html | html li with: 'Amber Web #with: added me!' ]",
-referencedClasses: ["HTMLCanvas"],
-//>>excludeEnd("ide");
-messageSends: ["root", "onJQuery:", "asJQuery", "with:", "li"]
-}),
-$globals.{%= name %});
-
-$core.addMethod(
-$core.method({
-selector: "doJQueryAppend",
-protocol: 'action',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv("#output-list"._asJQuery())._append_("<li>jQuery append added me!</li>");
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"doJQueryAppend",{},$globals.{%= name %})});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "doJQueryAppend\x0a\x09'#output-list' asJQuery append: '<li>jQuery append added me!</li>'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["append:", "asJQuery"]
-}),
-$globals.{%= name %});
-
-$core.addMethod(
-$core.method({
-selector: "doSilkTAG",
-protocol: 'action',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv("#output-list"._asSilk())._LI_("Silk TAG: added me!");
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"doSilkTAG",{},$globals.{%= name %})});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "doSilkTAG\x0a\x09'#output-list' asSilk LI: 'Silk TAG: added me!'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["LI:", "asSilk"]
-}),
-$globals.{%= name %});
-
-
-$core.addMethod(
-$core.method({
-selector: "start",
-protocol: 'starting',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv(self._new())._augmentPage();
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.{%= name %}.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "start\x0a\x09self new augmentPage",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["augmentPage", "new"]
-}),
-$globals.{%= name %}.klass);
-
-});

+ 0 - 10
root/src/test.js

@@ -1,10 +0,0 @@
-define("{%= namespace %}/{%= name %}-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
-if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
-var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-$core.addPackage('{%= name %}-Tests');
-($core.packageDescriptors||$core.packages)["{%= name %}-Tests"].innerEval = function (expr) { return eval(expr); };
-($core.packageDescriptors||$core.packages)["{%= name %}-Tests"].transport = {"type":"amd","amdNamespace":"{%= namespace %}"};
-
-$core.addClass('{%= name %}Test', $globals.TestCase, [], '{%= name %}-Tests');
-
-});

+ 1 - 1
template.js

@@ -18,7 +18,7 @@ exports.notes = ' _Project title_ should be a human-readable title.';
 exports.after = 'You need to have these installed globally via npm:' +
 ' _amber-cli_; _grunt-cli_; _bower_.' +
 ' Now, install project dependencies with _bower install_,' +
-' tool dependencies with _npm install_ and optionally, recompile with _grunt_.' +
+' tool dependencies with _npm install_ and recompile with _grunt_.' +
 ' If you are running _amber init_, these three tasks are going to be performed for you now.' +
 ' Afterwards, start the development server with _amber serve_.' +
 ' Your application is then accessible via _http://localhost:4000/_';