Permalink
Browse files

Add aliases documentation to the readme

  • Loading branch information...
vybs committed Mar 21, 2012
1 parent 9a7bc5d commit 65aa88118d752b4bf41f3747005c454d835bcbd7
Showing with 51,071 additions and 0 deletions.
  1. +53 −0 README.md
  2. +1 −0 node_modules/.bin/jasmine-node
  3. +1 −0 node_modules/jasmine-node/.idea/.name
  4. +12 −0 node_modules/jasmine-node/.npmignore
  5. +22 −0 node_modules/jasmine-node/LICENSE
  6. +56 −0 node_modules/jasmine-node/README.md
  7. +7 −0 node_modules/jasmine-node/bin/jasmine-node
  8. +41 −0 node_modules/jasmine-node/lib/jasmine-node/async-callback.js
  9. +86 −0 node_modules/jasmine-node/lib/jasmine-node/autotest.js
  10. +182 −0 node_modules/jasmine-node/lib/jasmine-node/cli.js
  11. +148 −0 node_modules/jasmine-node/lib/jasmine-node/index.js
  12. +2,479 −0 node_modules/jasmine-node/lib/jasmine-node/jasmine-2.0.0.rc1.js
  13. +275 −0 node_modules/jasmine-node/lib/jasmine-node/reporter.js
  14. +70 −0 node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
  15. +48 −0 node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
  16. +65 −0 node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
  17. +36 −0 node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
  18. +1 −0 node_modules/jasmine-node/node_modules/.bin/cake
  19. +1 −0 node_modules/jasmine-node/node_modules/.bin/coffee
  20. +1 −0 node_modules/jasmine-node/node_modules/.bin/r.js
  21. +11 −0 node_modules/jasmine-node/node_modules/coffee-script/.npmignore
  22. +22 −0 node_modules/jasmine-node/node_modules/coffee-script/LICENSE
  23. +51 −0 node_modules/jasmine-node/node_modules/coffee-script/README
  24. +78 −0 node_modules/jasmine-node/node_modules/coffee-script/Rakefile
  25. +7 −0 node_modules/jasmine-node/node_modules/coffee-script/bin/cake
  26. +7 −0 node_modules/jasmine-node/node_modules/coffee-script/bin/coffee
  27. +44 −0 node_modules/jasmine-node/node_modules/coffee-script/extras/jsl.conf
  28. +74 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/browser.js
  29. +99 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/cake.js
  30. +150 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/coffee-script.js
  31. +442 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/command.js
  32. +592 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/grammar.js
  33. +72 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/helpers.js
  34. +10 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/index.js
  35. +686 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/lexer.js
  36. +2,514 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/nodes.js
  37. +122 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/optparse.js
  38. +674 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/parser.js
  39. +149 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/repl.js
  40. +301 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/rewriter.js
  41. +124 −0 node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/scope.js
  42. +31 −0 node_modules/jasmine-node/node_modules/coffee-script/package.json
  43. +101 −0 node_modules/jasmine-node/node_modules/findit/README.markdown
  44. +3 −0 node_modules/jasmine-node/node_modules/findit/examples/callback.js
  45. +9 −0 node_modules/jasmine-node/node_modules/findit/examples/emitter.js
  46. +2 −0 node_modules/jasmine-node/node_modules/findit/examples/sync.js
  47. +142 −0 node_modules/jasmine-node/node_modules/findit/index.js
  48. +1 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/.npmignore
  49. +442 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/README.markdown
  50. +18 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/examples/join.js
  51. +12 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/examples/parseq.coffee
  52. +19 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/examples/parseq.js
  53. +16 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/examples/stat_all.coffee
  54. +17 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/examples/stat_all.js
  55. +520 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/index.js
  56. +1 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/.npmignore
  57. +140 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/README.markdown
  58. +25 −0 ...odules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/examples/add_do.js
  59. +67 −0 ...odules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/examples/prompt.js
  60. +108 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/index.js
  61. +1 −0 ...-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/.npmignore
  62. +24 −0 ...ine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/LICENSE
  63. +247 −0 .../node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/README.markdown
  64. +16 −0 ...node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/examples/json.js
  65. +15 −0 ...de_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/examples/leaves.js
  66. +8 −0 ..._modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/examples/negative.js
  67. +38 −0 ...modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/examples/stringify.js
  68. +322 −0 ...ne-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/index.js
  69. +18 −0 ...ode/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/package.json
  70. +114 −0 ...node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/circular.js
  71. +35 −0 ...ode/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/date.js
  72. +219 −0 ...de/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/equal.js
  73. +17 −0 ...node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/instance.js
  74. +42 −0 ...ode_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/interface.js
  75. +47 −0 ...ode/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/json.js
  76. +21 −0 ...e/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/leaves.js
  77. +203 −0 ...de_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/mutability.js
  78. +20 −0 ...node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/negative.js
  79. +15 −0 ...node/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/obj.js
  80. +41 −0 ...ode/node_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/stop.js
  81. +36 −0 ...ode_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/stringify.js
  82. +54 −0 ...de_modules/findit/node_modules/seq/node_modules/chainsaw/node_modules/traverse/test/super_deep.js
  83. +23 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/package.json
  84. +418 −0 ..._modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/chainsaw/test/chainsaw.js
  85. +191 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/README.markdown
  86. +9 −0 ..._modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/examples/chain.js
  87. +7 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/examples/map.js
  88. +253 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/index.js
  89. +1 −0 ...e-node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/.npmignore
  90. +24 −0 ...mine-node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/LICENSE
  91. +256 −0 ...e/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/README.markdown
  92. +16 −0 .../node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/examples/json.js
  93. +15 −0 ...ode_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/examples/leaves.js
  94. +8 −0 ...e_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/examples/negative.js
  95. +10 −0 ...node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/examples/scrub.js
  96. +38 −0 ..._modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/examples/stringify.js
  97. +279 −0 ...ine-node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/index.js
  98. +18 −0 ...node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/package.json
  99. +115 −0 .../node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/circular.js
  100. +35 −0 ...node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/date.js
  101. +220 −0 ...ode/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/equal.js
  102. +13 −0 ...-node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/has.js
  103. +17 −0 .../node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/instance.js
  104. +42 −0 ...node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/interface.js
  105. +47 −0 ...node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/json.js
  106. +29 −0 ...node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/keys.js
  107. +21 −0 ...de/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/leaves.js
  108. +92 −0 ...modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/lib/deep_equal.js
  109. +252 −0 ...ode_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/mutability.js
  110. +20 −0 .../node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/negative.js
  111. +15 −0 ...-node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/obj.js
  112. +35 −0 .../node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/siblings.js
  113. +41 −0 ...node/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/stop.js
  114. +36 −0 ...node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/stringify.js
  115. +34 −0 ...e/node_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/subexpr.js
  116. +55 −0 ...ode_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/test/super_deep.js
  117. +22 −0 ...ode_modules/findit/node_modules/seq/node_modules/hashish/node_modules/traverse/testling/leaves.js
  118. +33 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/package.json
  119. +250 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/test/hash.js
  120. +69 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/node_modules/hashish/test/property.js
  121. +33 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/package.json
  122. +35 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/test/readdir.js
  123. +946 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/test/seq.js
  124. +149 −0 node_modules/jasmine-node/node_modules/findit/node_modules/seq/test/seq_.js
  125. +34 −0 node_modules/jasmine-node/node_modules/findit/package.json
  126. +31 −0 node_modules/jasmine-node/node_modules/findit/test/cb.js
  127. +79 −0 node_modules/jasmine-node/node_modules/findit/test/foo.js
  128. 0 node_modules/jasmine-node/node_modules/findit/test/foo/a/b/c/w
  129. 0 node_modules/jasmine-node/node_modules/findit/test/foo/a/b/z
  130. 0 node_modules/jasmine-node/node_modules/findit/test/foo/a/y
  131. 0 node_modules/jasmine-node/node_modules/findit/test/foo/x
  132. +29 −0 node_modules/jasmine-node/node_modules/findit/test/module.js
  133. +73 −0 node_modules/jasmine-node/node_modules/findit/test/symlinks.js
  134. +1 −0 node_modules/jasmine-node/node_modules/findit/test/symlinks/dir1/dangling-symlink
  135. 0 node_modules/jasmine-node/node_modules/findit/test/symlinks/dir1/file1
  136. 0 node_modules/jasmine-node/node_modules/findit/test/symlinks/dir2/file2
  137. 0 node_modules/jasmine-node/node_modules/findit/test/symlinks/file
  138. +2 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/.npmignore
  139. +21 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/LICENSE
  140. +52 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/README.markdown
  141. +13,989 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/ext/env.rhino.1.2.js
  142. +182 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine-html.js
  143. +166 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.css
  144. +2,421 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.js
  145. BIN node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jline.jar
  146. BIN node_modules/jasmine-node/node_modules/jasmine-reporters/ext/js.jar
  147. +15 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/package.json
  148. +142 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.console_reporter.js
  149. +200 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js
  150. +139 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.teamcity_reporter.js
  151. +3 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/src/load_reporters.js
  152. +214 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js
  153. +36 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/console_reporter.html
  154. +14 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.bootstrap.js
  155. +7 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.runner.sh
  156. +23 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/junit_xml_reporter.html
  157. +183 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs-testrunner.js
  158. +36 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs.runner.sh
  159. +36 −0 node_modules/jasmine-node/node_modules/jasmine-reporters/test/teamcity_reporter.html
  160. +1 −0 node_modules/jasmine-node/node_modules/requirejs/.npmignore
  161. +9,823 −0 node_modules/jasmine-node/node_modules/requirejs/bin/r.js
  162. +24 −0 node_modules/jasmine-node/node_modules/requirejs/package.json
  163. +2,053 −0 node_modules/jasmine-node/node_modules/requirejs/require.js
  164. +1 −0 node_modules/jasmine-node/node_modules/underscore/.gitignore
  165. +3 −0 node_modules/jasmine-node/node_modules/underscore/.npmignore
  166. +22 −0 node_modules/jasmine-node/node_modules/underscore/LICENSE
  167. +19 −0 node_modules/jasmine-node/node_modules/underscore/README.md
  168. +1,975 −0 node_modules/jasmine-node/node_modules/underscore/index.html
  169. +1 −0 node_modules/jasmine-node/node_modules/underscore/index.js
  170. +10 −0 node_modules/jasmine-node/node_modules/underscore/package.json
  171. +31 −0 node_modules/jasmine-node/node_modules/underscore/underscore-min.js
  172. +999 −0 node_modules/jasmine-node/node_modules/underscore/underscore.js
  173. +28 −0 node_modules/jasmine-node/package.json
  174. +8 −0 node_modules/jasmine-node/scripts/specs
  175. +7 −0 node_modules/jasmine-node/spec/AsyncSpec.coffee
  176. +4 −0 node_modules/jasmine-node/spec/CoffeeSpec.coffee
  177. +22 −0 node_modules/jasmine-node/spec/GrammarHelper.coffee
  178. +6 −0 node_modules/jasmine-node/spec/HelperSpec.coffee
  179. +25 −0 node_modules/jasmine-node/spec/SampleSpecs.js
  180. +5 −0 node_modules/jasmine-node/spec/TestSpec.js
  181. +131 −0 node_modules/jasmine-node/spec/async-callback_spec.js
  182. +7 −0 node_modules/jasmine-node/spec/helper_spec.js
  183. +5 −0 node_modules/jasmine-node/spec/nested.js/NestedSpec.js
  184. +5 −0 node_modules/jasmine-node/spec/nested/NestedSpec.js
  185. +11 −0 node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
  186. +432 −0 node_modules/jasmine-node/spec/reporter_spec.js
  187. +19 −0 node_modules/jasmine-node/spec/sample_helper.js
  188. +3 −0 node_modules/jasmine-node/specs.sh
View
@@ -118,3 +118,56 @@ Extensive docs and a full demo are available at <http://akdubya.github.com/dustj
{:else}
{@pre.i18n key="no" text="No, there are less than 3 names"/}
{/if}
+
+Global Aliases in dust
+----------------------
+
+Most often we tend to reuse the same data in the template again and again ... One way to avoid been repetitive is use aliases. So a common question was, how does dust support this ?
+
+Well, in dust there is more than one way neat way to do this.
+
+*Use Inline Partials*
+
+ Inline partials never output content themselves, and are always global to the template in which they are defined, so the order of their definition has no significance.
+
+ Key points to note : They are global to the template., there is no ordering and can be defined anywhere
+
+ *Step 1* create global alias
+
+ {<greeting}Hello, Hola{/greeting}
+
+ *Step 2*
+
+ {#names}
+ {.} {+greeting/}
+ {/names}
+
+ {#projects}
+ {.} {+greeting/}
+ {/projects}
+
+
+
+Block Aliases in dust
+----------------------
+Inline parameters appear within the section's opening tag. Parameters are separated by a single space.
+
+ {#profile bar="baz" bing="bong"}
+ {name}, {bar}, {bing}
+ {/profile}
+
+ *There are 3 flavors*
+
+ {#test greeting="hello"} // constant b
+ {greeting}
+ {/test}
+
+ {#test greeting=hello} // looks for a json context hello in the JSON hierarchy
+ {greeting}
+ {/test}
+
+
+ {#test greeting="{hello}"} // resolves hello when greeting is referenced in the block and it resolves to the first one in the hierarchy
+ {greeting}
+ {/test}
+

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.

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

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 65aa881

Please sign in to comment.