Permalink
Browse files

releasing version 0.5.0

  • Loading branch information...
1 parent f0e9c61 commit 42744346ed0ba7aabe87354d72f4caa1906f81c1 @arboleya committed Apr 12, 2012
Showing with 2,692 additions and 1,531 deletions.
  1. +343 −238 README.md
  2. +39 −0 examples/basic/release/app-debug.js
  3. +81 −37 examples/basic/release/app.js
  4. +2 −8 examples/basic/release/index.html
  5. +23 −0 examples/basic/release/toaster/basic/app.js
  6. +15 −0 examples/basic/release/toaster/basic/letters/a.js
  7. +15 −0 examples/basic/release/toaster/basic/letters/b.js
  8. +15 −0 examples/basic/release/toaster/basic/repeating/a.js
  9. +15 −0 examples/basic/release/toaster/basic/repeating/b.js
  10. +5 −0 examples/basic/release/toaster/basic/single/script.js
  11. +15 −0 examples/basic/release/toaster/basic/toplevel.js
  12. +0 −16 examples/basic/release/toaster/src/app.js
  13. +0 −7 examples/basic/release/toaster/src/letters/a.js
  14. +0 −7 examples/basic/release/toaster/src/letters/b.js
  15. +0 −7 examples/basic/release/toaster/src/repeating/a.js
  16. +0 −7 examples/basic/release/toaster/src/repeating/b.js
  17. +0 −1 examples/basic/release/toaster/src/single/script.js
  18. +0 −7 examples/basic/release/toaster/src/toplevel.js
  19. +0 −27 examples/basic/release/toaster/toaster.js
  20. +11 −14 examples/basic/src/{ → basic}/app.coffee
  21. 0 examples/basic/src/{ → basic}/letters/a.coffee
  22. 0 examples/basic/src/{ → basic}/letters/b.coffee
  23. 0 examples/basic/src/{ → basic}/repeating/a.coffee
  24. 0 examples/basic/src/{ → basic}/repeating/b.coffee
  25. 0 examples/basic/src/{ → basic}/single/script.coffee
  26. 0 examples/basic/src/{ → basic}/toplevel.coffee
  27. +17 −7 examples/basic/toaster.coffee
  28. +1 −1 examples/basic/vendors/_.js
  29. +1 −1 examples/basic/vendors/jquery.js
  30. +0 −1 examples/multi-modules/README.md
  31. +0 −13 examples/multi-modules/release/animals.js
  32. +0 −25 examples/multi-modules/release/animals_insects.js
  33. +0 −13 examples/multi-modules/release/insects.js
  34. +0 −25 examples/multi-modules/release/insects_animals.js
  35. +0 −7 examples/multi-modules/release/toaster/src/insects/bee.js
  36. +0 −6 examples/multi-modules/release/toaster/toaster.js
  37. +0 −2 examples/multi-modules/src_animals/animals/horse.coffee
  38. +0 −2 examples/multi-modules/src_insects/insects/bee.coffee
  39. +0 −30 examples/multi-modules/toaster.coffee
  40. +0 −1 examples/multi-modules/vendors/_.js
  41. +0 −1 examples/multi-modules/vendors/jquery.js
  42. +60 −0 examples/multimodules/release/app-debug.js
  43. +398 −0 examples/multimodules/release/app.js
  44. +2 −0 examples/multimodules/release/index.html
  45. +19 −0 examples/multimodules/release/toaster/app/app.js
  46. +15 −0 examples/multimodules/release/toaster/artists/progressive/kingcrimson.js
  47. +15 −0 examples/multimodules/release/toaster/artists/progressive/themarsvolta.js
  48. +15 −0 examples/multimodules/release/toaster/artists/progressive/tool.js
  49. +15 −0 examples/multimodules/release/toaster/artists/triphop/lovage.js
  50. +15 −0 examples/multimodules/release/toaster/artists/triphop/massiveattack.js
  51. +15 −0 examples/multimodules/release/toaster/artists/triphop/portishead.js
  52. +18 −0 examples/multimodules/release/toaster/genres/progressive.js
  53. +18 −0 examples/multimodules/release/toaster/genres/triphop.js
  54. +9 −0 examples/multimodules/src/app/app.coffee
  55. +2 −0 examples/multimodules/src/artists/progressive/kingcrimson.coffee
  56. +2 −0 examples/multimodules/src/artists/progressive/themarsvolta.coffee
  57. +2 −0 examples/multimodules/src/artists/progressive/tool.coffee
  58. +2 −0 examples/multimodules/src/artists/triphop/lovage.coffee
  59. +2 −0 examples/multimodules/src/artists/triphop/massiveattack.coffee
  60. +2 −0 examples/multimodules/src/artists/triphop/portishead.coffee
  61. +8 −0 examples/multimodules/src/genres/progressive.coffee
  62. +8 −0 examples/multimodules/src/genres/triphop.coffee
  63. +13 −0 examples/multimodules/toaster.coffee
  64. BIN images/error.png
  65. BIN images/toaster.png
  66. BIN images/warning.png
  67. +778 −471 lib/toaster.js
  68. +5 −12 package.json
  69. +36 −52 src/toaster.coffee
  70. +31 −26 src/toaster/{parser.coffee → cli.coffee}
  71. +62 −30 src/toaster/config.coffee
  72. +118 −38 src/toaster/core/builder.coffee
  73. +102 −178 src/toaster/core/module.coffee
  74. +37 −23 src/toaster/core/script.coffee
  75. +83 −27 src/toaster/generators/config.coffee
  76. +50 −30 src/toaster/generators/project.coffee
  77. +1 −0 src/toaster/generators/question.coffee
  78. +14 −4 src/toaster/utils/array-util.coffee
  79. +29 −14 src/toaster/utils/fs-util.coffee
  80. +82 −0 src/toaster/utils/log-utils.coffee
  81. +4 −1 src/toaster/utils/string-util.coffee
  82. +3 −0 tests/README.md
  83. +0 −44 tests/all.js
  84. +0 −58 tests/src/project.coffee
  85. +4 −12 toaster.coffee
View
581 README.md

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,39 @@
+var UNDERSCORE = {};
+var JQUERY = {};
+var __t;
+
+__t = function(ns, expose) {
+ var curr, index, part, parts, _i, _len;
+ curr = null;
+ parts = [].concat = ns.split(".");
+ for (index = _i = 0, _len = parts.length; _i < _len; index = ++_i) {
+ part = parts[index];
+ if (curr === null) {
+ curr = eval(part);
+ if (expose != null) {
+ expose[part] = curr;
+ }
+ continue;
+ } else {
+ if (curr[part] == null) {
+ curr = curr[part] = {};
+ if (expose != null) {
+ expose[part] = curr;
+ }
+ } else {
+ curr = curr[part];
+ }
+ }
+ }
+ return curr;
+};
+
+var basic = window.basic = {};
+
+document.write('<scri'+'pt src="./toaster/basic/letters/a.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/letters/b.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/repeating/a.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/repeating/b.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/single/script.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/toplevel.js"></scr'+'ipt>')
+document.write('<scri'+'pt src="./toaster/basic/app.js"></scr'+'ipt>')
@@ -1,73 +1,117 @@
-// UNDERSCORE
-// JQUERY
-(function() {
- var A, App, B, TopLevel, letters, pkg, repeating, single;
- letters = {};
- repeating = {};
- single = {};
- pkg = function(ns) {
- var curr, index, part, parts, _len;
- curr = null;
- parts = [].concat = ns.split(".");
- for (index = 0, _len = parts.length; index < _len; index++) {
- part = parts[index];
- if (curr === null) {
- curr = eval(part);
- continue;
- } else {
- if (curr[part] == null) {
- curr = curr[part] = {};
- } else {
- curr = curr[part];
+var UNDERSCORE = {};
+var JQUERY = {};
+var __t;
+
+__t = function(ns, expose) {
+ var curr, index, part, parts, _i, _len;
+ curr = null;
+ parts = [].concat = ns.split(".");
+ for (index = _i = 0, _len = parts.length; _i < _len; index = ++_i) {
+ part = parts[index];
+ if (curr === null) {
+ curr = eval(part);
+ if (expose != null) {
+ expose[part] = curr;
+ }
+ continue;
+ } else {
+ if (curr[part] == null) {
+ curr = curr[part] = {};
+ if (expose != null) {
+ expose[part] = curr;
}
+ } else {
+ curr = curr[part];
}
}
- return curr;
- };
- pkg('letters').A = A = (function() {
+ }
+ return curr;
+};
+
+var basic = window.basic = {};
+
+(function() {
+
+ __t('basic.letters', window).A = (function() {
+
+ A.name = 'A';
+
function A() {
console.log("letters/A created!");
}
+
return A;
+
})();
- pkg('letters').B = B = (function() {
+
+ __t('basic.letters', window).B = (function() {
+
+ B.name = 'B';
+
function B() {
console.log("letters/B created!");
}
+
return B;
+
})();
- pkg('repeating').A = A = (function() {
+
+ __t('basic.repeating', window).A = (function() {
+
+ A.name = 'A';
+
function A() {
console.log("repeating/A created!");
}
+
return A;
+
})();
- pkg('repeating').B = B = (function() {
+
+ __t('basic.repeating', window).B = (function() {
+
+ B.name = 'B';
+
function B() {
console.log("repeating/B created!");
}
+
return B;
+
})();
+
console.log("----------------------------------------------------------------------------\n:: I am the single/script file, you wont find any class declaration in me!\n\t So I will run as soon as I am processed, without the needing to be\n\t instantiated etc -- and thats why this log message will appear before\n\t the others (in this example).\n----------------------------------------------------------------------------");
- TopLevel = (function() {
+
+ __t('basic', window).TopLevel = (function() {
+
+ TopLevel.name = 'TopLevel';
+
function TopLevel() {
console.log("TopLevel created!");
}
+
return TopLevel;
+
})();
- App = (function() {
+
+ __t('basic', window).App = (function() {
+
+ App.name = 'App';
+
function App() {
console.log("App created!");
- new A;
- new B;
- new TopLevel;
+ new basic.TopLevel;
console.log("--------------------------------------------------------------------\n:: Namespaces are also welcome :)\n\t ..and helps you to differ two classes with the same name.\n\t In the lines bellow, two classes named 'A' and 'B' are\n\t instantiated independently, through namespaces.\n\t Namespaces are automatically generated based on the folder the\n\t the files are, relative to the src folder.\n--------------------------------------------------------------------");
- new letters.A;
- new letters.B;
- new repeating.A;
- new repeating.B;
+ new basic.letters.A;
+ new basic.letters.B;
+ new basic.repeating.A;
+ new basic.repeating.B;
}
+
return App;
+
})();
- new App;
+
+ new basic.App;
+
}).call(this);
@@ -1,8 +1,2 @@
-<html>
- <head>
- <!-- <script type="text/javascript" src="toaster/toaster.js"></script> -->
- <script type="text/javascript" src="app.js"></script>
- </head>
- <body>
- </body>
-</html>
+<!-- <script src="app.js"></script> -->
+<script src="app-debug.js"></script>
@@ -0,0 +1,23 @@
+(function() {
+
+ __t('basic', window).App = (function() {
+
+ App.name = 'App';
+
+ function App() {
+ console.log("App created!");
+ new basic.TopLevel;
+ console.log("--------------------------------------------------------------------\n:: Namespaces are also welcome :)\n\t ..and helps you to differ two classes with the same name.\n\t In the lines bellow, two classes named 'A' and 'B' are\n\t instantiated independently, through namespaces.\n\t Namespaces are automatically generated based on the folder the\n\t the files are, relative to the src folder.\n--------------------------------------------------------------------");
+ new basic.letters.A;
+ new basic.letters.B;
+ new basic.repeating.A;
+ new basic.repeating.B;
+ }
+
+ return App;
+
+ })();
+
+ new basic.App;
+
+}).call(this);
@@ -0,0 +1,15 @@
+(function() {
+
+ __t('basic.letters', window).A = (function() {
+
+ A.name = 'A';
+
+ function A() {
+ console.log("letters/A created!");
+ }
+
+ return A;
+
+ })();
+
+}).call(this);
@@ -0,0 +1,15 @@
+(function() {
+
+ __t('basic.letters', window).B = (function() {
+
+ B.name = 'B';
+
+ function B() {
+ console.log("letters/B created!");
+ }
+
+ return B;
+
+ })();
+
+}).call(this);
@@ -0,0 +1,15 @@
+(function() {
+
+ __t('basic.repeating', window).A = (function() {
+
+ A.name = 'A';
+
+ function A() {
+ console.log("repeating/A created!");
+ }
+
+ return A;
+
+ })();
+
+}).call(this);
@@ -0,0 +1,15 @@
+(function() {
+
+ __t('basic.repeating', window).B = (function() {
+
+ B.name = 'B';
+
+ function B() {
+ console.log("repeating/B created!");
+ }
+
+ return B;
+
+ })();
+
+}).call(this);
@@ -0,0 +1,5 @@
+(function() {
+
+ console.log("----------------------------------------------------------------------------\n:: I am the single/script file, you wont find any class declaration in me!\n\t So I will run as soon as I am processed, without the needing to be\n\t instantiated etc -- and thats why this log message will appear before\n\t the others (in this example).\n----------------------------------------------------------------------------");
+
+}).call(this);
@@ -0,0 +1,15 @@
+(function() {
+
+ __t('basic', window).TopLevel = (function() {
+
+ TopLevel.name = 'TopLevel';
+
+ function TopLevel() {
+ console.log("TopLevel created!");
+ }
+
+ return TopLevel;
+
+ })();
+
+}).call(this);
@@ -1,16 +0,0 @@
-var App;
-App = (function() {
- function App() {
- console.log("App created!");
- new A;
- new B;
- new TopLevel;
- console.log("--------------------------------------------------------------------\n:: Namespaces are also welcome :)\n\t ..and helps you to differ two classes with the same name.\n\t In the lines bellow, two classes named 'A' and 'B' are\n\t instantiated independently, through namespaces.\n\t Namespaces are automatically generated based on the folder the\n\t the files are, relative to the src folder.\n--------------------------------------------------------------------");
- new letters.A;
- new letters.B;
- new repeating.A;
- new repeating.B;
- }
- return App;
-})();
-new App;
@@ -1,7 +0,0 @@
-var A;
-pkg('letters').A = A = (function() {
- function A() {
- console.log("letters/A created!");
- }
- return A;
-})();
@@ -1,7 +0,0 @@
-var B;
-pkg('letters').B = B = (function() {
- function B() {
- console.log("letters/B created!");
- }
- return B;
-})();
@@ -1,7 +0,0 @@
-var A;
-pkg('repeating').A = A = (function() {
- function A() {
- console.log("repeating/A created!");
- }
- return A;
-})();
@@ -1,7 +0,0 @@
-var B;
-pkg('repeating').B = B = (function() {
- function B() {
- console.log("repeating/B created!");
- }
- return B;
-})();

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,7 +0,0 @@
-var TopLevel;
-TopLevel = (function() {
- function TopLevel() {
- console.log("TopLevel created!");
- }
- return TopLevel;
-})();
Oops, something went wrong.

0 comments on commit 4274434

Please sign in to comment.