Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

client side build tools working

  • Loading branch information...
commit 66e29e7ed0cad3f508d6b4d961f85cd66760701a 1 parent b6d1726
@cif authored
Showing with 55,302 additions and 5 deletions.
  1. BIN  .DS_Store
  2. +6 −5 README.md
  3. +11 −0 bin/flint
  4. +280 −0 node/coffee.js
  5. +86 −0 node/dependency.js
  6. +57 −0 node/flint.js
  7. +152 −0 node/styler.js
  8. +1 −0  node_modules/.bin/cake
  9. +1 −0  node_modules/.bin/coffee
  10. +1 −0  node_modules/.bin/handlebar-rider
  11. +1 −0  node_modules/.bin/stylus
  12. +1 −0  node_modules/.bin/toaster
  13. +1 −0  node_modules/.bin/uglifyjs
  14. +1 −0  node_modules/coffee-script
  15. 0  toaster.coffee → node_modules/express-resource/.gitmodules
  16. +2 −0  node_modules/express-resource/.npmignore
  17. +51 −0 node_modules/express-resource/History.md
  18. +6 −0 node_modules/express-resource/Makefile
  19. +194 −0 node_modules/express-resource/Readme.md
  20. +54 −0 node_modules/express-resource/examples/content-negotiation.js
  21. +34 −0 node_modules/express-resource/examples/controllers/forum.js
  22. +26 −0 node_modules/express-resource/examples/controllers/thread.js
  23. +16 −0 node_modules/express-resource/examples/nesting.js
  24. +22 −0 node_modules/express-resource/examples/root.js
  25. +50 −0 node_modules/express-resource/examples/user.js
  26. +262 −0 node_modules/express-resource/index.js
  27. +3 −0  node_modules/express-resource/node_modules/lingo/.gitmodules
  28. +1 −0  node_modules/express-resource/node_modules/lingo/.npmignore
  29. +28 −0 node_modules/express-resource/node_modules/lingo/History.md
  30. +22 −0 node_modules/express-resource/node_modules/lingo/LICENSE
  31. +17 −0 node_modules/express-resource/node_modules/lingo/Makefile
  32. +128 −0 node_modules/express-resource/node_modules/lingo/Readme.md
  33. +572 −0 node_modules/express-resource/node_modules/lingo/index.html
  34. +2 −0  node_modules/express-resource/node_modules/lingo/index.js
  35. +194 −0 node_modules/express-resource/node_modules/lingo/lib/inflection.js
  36. +52 −0 node_modules/express-resource/node_modules/lingo/lib/language.js
  37. +138 −0 node_modules/express-resource/node_modules/lingo/lib/languages/en.js
  38. +91 −0 node_modules/express-resource/node_modules/lingo/lib/languages/es.js
  39. +140 −0 node_modules/express-resource/node_modules/lingo/lib/lingo.js
  40. +24 −0 node_modules/express-resource/node_modules/lingo/package.json
  41. +118 −0 node_modules/express-resource/node_modules/lingo/test/inflection.en.test.js
  42. +50 −0 node_modules/express-resource/node_modules/lingo/test/inflection.es.test.js
  43. +38 −0 node_modules/express-resource/node_modules/lingo/test/lingo.test.js
  44. +30 −0 node_modules/express-resource/node_modules/lingo/test/translation.test.js
  45. +38 −0 node_modules/express-resource/package.json
  46. +15 −0 node_modules/handlebar-rider/.npmignore
  47. +75 −0 node_modules/handlebar-rider/README.md
  48. +8 −0 node_modules/handlebar-rider/bin/handlebar-rider
  49. +296 −0 node_modules/handlebar-rider/lib/handlebar-rider.js
  50. +1 −0  node_modules/handlebar-rider/node_modules/.bin/handlebars
  51. +1 −0  node_modules/handlebar-rider/node_modules/.bin/uglifyjs
  52. +52 −0 node_modules/handlebar-rider/node_modules/handlebars/.jshintrc
  53. +11 −0 node_modules/handlebar-rider/node_modules/handlebars/.npmignore
  54. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/.rspec
  55. +20 −0 node_modules/handlebar-rider/node_modules/handlebars/LICENSE
  56. +316 −0 node_modules/handlebar-rider/node_modules/handlebars/README.markdown
  57. +139 −0 node_modules/handlebar-rider/node_modules/handlebars/bin/handlebars
  58. +10 −0 node_modules/handlebar-rider/node_modules/handlebars/handlebars.sublime-project
  59. +3,338 −0 node_modules/handlebar-rider/node_modules/handlebars/handlebars.sublime-workspace
  60. +14 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars.js
  61. +119 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/base.js
  62. +123 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/ast.js
  63. +27 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/base.js
  64. +1,066 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/compiler.js
  65. +7 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/index.js
  66. +488 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/parser.js
  67. +127 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/printer.js
  68. +13 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/compiler/visitor.js
  69. +68 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/runtime.js
  70. +68 −0 node_modules/handlebar-rider/node_modules/handlebars/lib/handlebars/utils.js
  71. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/.bin/uglifyjs
  72. +4 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/.npmignore
  73. +981 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/README.html
  74. +578 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/README.org
  75. +332 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs
  76. +75 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/docstyle.css
  77. +2,599 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/lib/consolidator.js
  78. +75 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/lib/object-ast.js
  79. +1,346 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/lib/parse-js.js
  80. +2,011 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/lib/process.js
  81. +73 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/lib/squeeze-more.js
  82. +21 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/package.json
  83. +24 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/package.json~
  84. +28 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/beautify.js
  85. +403 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/testparser.js
  86. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/array1.js
  87. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/array2.js
  88. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/array3.js
  89. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/array4.js
  90. +1 −0  ...es/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/assignment.js
  91. +1 −0  .../handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/concatstring.js
  92. +1 −0  ...modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/const.js
  93. +1 −0  .../handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js
  94. +1 −0  .../handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/forstatement.js
  95. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/if.js
  96. +1 −0  ...ules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js
  97. +1 −0  ...les/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js
  98. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue10.js
  99. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue11.js
  100. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue13.js
  101. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue14.js
  102. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue16.js
  103. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue17.js
  104. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue20.js
  105. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue21.js
  106. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue25.js
  107. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue27.js
  108. +1 −0  ...ules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue278.js
  109. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue28.js
  110. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue29.js
  111. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue30.js
  112. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue34.js
  113. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue4.js
  114. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue48.js
  115. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue50.js
  116. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue53.js
  117. +1 −0  ...les/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js
  118. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue68.js
  119. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue69.js
  120. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/issue9.js
  121. +1 −0  ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/mangle.js
  122. +1 −0  ...s/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/null_string.js
  123. +1 −0  ...handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js
  124. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/var.js
  125. +1 −0  ...es/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/whitespace.js
  126. +1 −0  ..._modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/expected/with.js
  127. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/array1.js
  128. +4 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/array2.js
  129. +4 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/array3.js
  130. +6 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/array4.js
  131. +20 −0 ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/assignment.js
  132. +3 −0  ...ules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/concatstring.js
  133. +5 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/const.js
  134. +4 −0 ...ules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js
  135. +10 −0 ...ules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/forstatement.js
  136. +6 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/if.js
  137. +9 −0 ..._modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/ifreturn.js
  138. +16 −0 ...modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js
  139. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue10.js
  140. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue11.js
  141. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue13.js
  142. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue14.js
  143. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue16.js
  144. +4 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue17.js
  145. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue20.js
  146. +6 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue21.js
  147. +7 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue25.js
  148. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue27.js
  149. +1 −0  ..._modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue278.js
  150. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue28.js
  151. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue29.js
  152. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue30.js
  153. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue34.js
  154. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue4.js
  155. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue48.js
  156. +9 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue50.js
  157. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue53.js
  158. +3 −0  ...modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue54.1.js
  159. +5 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue68.js
  160. +1 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue69.js
  161. +4 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/issue9.js
  162. +5 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/mangle.js
  163. +1 −0  ...dules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/null_string.js
  164. +3 −0  ...les/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/strict-equals.js
  165. +3 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/var.js
  166. +21 −0 ...odules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/whitespace.js
  167. +2 −0  node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/compress/test/with.js
  168. +55 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/test/unit/scripts.js
  169. +13 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/269.js
  170. +22,315 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/app.js
  171. +15 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/embed-tokens.js
  172. +26 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/goto.js
  173. +8 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/goto2.js
  174. +33 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/hoist.js
  175. +97 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/instrument.js
  176. +138 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/instrument2.js
  177. +8 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/liftvars.js
  178. +30 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/test.js
  179. +3,930 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/uglify-hangs.js
  180. +166 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/tmp/uglify-hangs2.js
  181. +18 −0 node_modules/handlebar-rider/node_modules/handlebars/node_modules/uglify-js/uglify-js.js
  182. +34 −0 node_modules/handlebar-rider/node_modules/handlebars/package.json
  183. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/.npmignore
  184. +1,026 −0 node_modules/handlebar-rider/node_modules/uglify-js/README.html
  185. +571 −0 node_modules/handlebar-rider/node_modules/uglify-js/README.org
  186. +317 −0 node_modules/handlebar-rider/node_modules/uglify-js/bin/uglifyjs
  187. +75 −0 node_modules/handlebar-rider/node_modules/uglify-js/docstyle.css
  188. +75 −0 node_modules/handlebar-rider/node_modules/uglify-js/lib/object-ast.js
  189. +1,339 −0 node_modules/handlebar-rider/node_modules/uglify-js/lib/parse-js.js
  190. +2,001 −0 node_modules/handlebar-rider/node_modules/uglify-js/lib/process.js
  191. +51 −0 node_modules/handlebar-rider/node_modules/uglify-js/lib/squeeze-more.js
  192. +21 −0 node_modules/handlebar-rider/node_modules/uglify-js/package.json
  193. +24 −0 node_modules/handlebar-rider/node_modules/uglify-js/package.json~
  194. +28 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/beautify.js
  195. +403 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/testparser.js
  196. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/array1.js
  197. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/array2.js
  198. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/array3.js
  199. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/array4.js
  200. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/assignment.js
  201. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/concatstring.js
  202. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/const.js
  203. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js
  204. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/forstatement.js
  205. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/if.js
  206. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js
  207. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js
  208. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue10.js
  209. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue11.js
  210. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue13.js
  211. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue14.js
  212. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue16.js
  213. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue17.js
  214. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue20.js
  215. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue21.js
  216. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue25.js
  217. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue27.js
  218. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue28.js
  219. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue29.js
  220. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue30.js
  221. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue34.js
  222. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue4.js
  223. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue48.js
  224. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue50.js
  225. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue53.js
  226. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js
  227. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue68.js
  228. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue69.js
  229. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/issue9.js
  230. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/mangle.js
  231. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/null_string.js
  232. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js
  233. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/var.js
  234. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/whitespace.js
  235. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/expected/with.js
  236. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/array1.js
  237. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/array2.js
  238. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/array3.js
  239. +6 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/array4.js
  240. +20 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/assignment.js
  241. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/concatstring.js
  242. +5 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/const.js
  243. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js
  244. +10 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/forstatement.js
  245. +6 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/if.js
  246. +9 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/ifreturn.js
  247. +16 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js
  248. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue10.js
  249. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue11.js
  250. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue13.js
  251. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue14.js
  252. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue16.js
  253. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue17.js
  254. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue20.js
  255. +6 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue21.js
  256. +7 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue25.js
  257. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue27.js
  258. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue28.js
  259. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue29.js
  260. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue30.js
  261. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue34.js
  262. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue4.js
  263. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue48.js
  264. +9 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue50.js
  265. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue53.js
  266. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue54.1.js
  267. +5 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue68.js
  268. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue69.js
  269. +4 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/issue9.js
  270. +5 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/mangle.js
  271. +1 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/null_string.js
  272. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/strict-equals.js
  273. +3 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/var.js
  274. +21 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/whitespace.js
  275. +2 −0  node_modules/handlebar-rider/node_modules/uglify-js/test/unit/compress/test/with.js
  276. +55 −0 node_modules/handlebar-rider/node_modules/uglify-js/test/unit/scripts.js
  277. +33 −0 node_modules/handlebar-rider/node_modules/uglify-js/tmp/hoist.js
  278. +97 −0 node_modules/handlebar-rider/node_modules/uglify-js/tmp/instrument.js
  279. +138 −0 node_modules/handlebar-rider/node_modules/uglify-js/tmp/instrument2.js
  280. +30 −0 node_modules/handlebar-rider/node_modules/uglify-js/tmp/test.js
  281. +17 −0 node_modules/handlebar-rider/node_modules/uglify-js/uglify-js.js
  282. +34 −0 node_modules/handlebar-rider/package.json
  283. +1 −0  node_modules/optimist
  284. +22 −0 node_modules/stylus/LICENSE
  285. +157 −0 node_modules/stylus/Readme.md
  286. +596 −0 node_modules/stylus/bin/stylus
  287. +63 −0 node_modules/stylus/bm.js
  288. +4 −0 node_modules/stylus/index.js
  289. +156 −0 node_modules/stylus/lib/colors.js
  290. +130 −0 node_modules/stylus/lib/convert/css.js
  291. +58 −0 node_modules/stylus/lib/errors.js
  292. +121 −0 node_modules/stylus/lib/functions/image.js
  293. +809 −0 node_modules/stylus/lib/functions/index.js
  294. +227 −0 node_modules/stylus/lib/functions/index.styl
  295. +98 −0 node_modules/stylus/lib/functions/url.js
  296. +792 −0 node_modules/stylus/lib/lexer.js
  297. +211 −0 node_modules/stylus/lib/middleware.js
  298. +65 −0 node_modules/stylus/lib/nodes/arguments.js
  299. +54 −0 node_modules/stylus/lib/nodes/binop.js
  300. +99 −0 node_modules/stylus/lib/nodes/block.js
Sorry, we could not display the entire diff because too many files (407) changed.
View
BIN  .DS_Store
Binary file not shown
View
11 README.md
@@ -1,10 +1,11 @@
-flint
-=====
+# flint
+================
-2 simple goals of this project:
+Full stack coffee script development. This is in it's very early stages, the client side compile and watch tools are the only thing working right now.
-1. Single model definitions for Backbone Client and Server Flatiron-based Modeling
+STAY TUNED.
-2. Built-in routing conventions for server side modeling
+### Install:
+ npm install -g flint
View
11 bin/flint
@@ -0,0 +1,11 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var fs = require('fs');
+var node = path.join(path.dirname(fs.realpathSync(__filename)), '../node');
+
+flint = require(node + '/flint')
+
+
+
+
View
280 node/coffee.js
@@ -0,0 +1,280 @@
+
+// compiles the coffeescript into a single file
+
+
+// handlebar coffee
+
+coffeescript = require('coffee-script');
+uglify = require('uglify-js');
+fs = require('fs');
+
+
+(function(){
+
+ //colored output
+ var color = {
+ red : '\u001b[31m',
+ blue: '\u001b[36m',
+ green: '\u001b[32m',
+ yellow: '\u001b[33m',
+ reset: '\u001b[0m'
+ }
+
+ //options and helper functions scoped globally in simple namespaced object
+ var coffee = {
+
+ in: './app/coffee/',
+ out: './public/javascript/application.js',
+ scripts: [],
+ directories: [],
+ minify: false
+
+ }
+
+ // recursively reads in directory and namespaces template and partial objects
+ var recurseCoffeeDirectory = function(dir, done) {
+
+ // stores results
+ var results = []
+
+ // read the directory
+ fs.readdir(dir, function(err, list) {
+
+ if (err) return done(err);
+ var pending = list.length;
+ if (!pending) return done(null, results);
+
+ // walk it
+ list.forEach( function(file) {
+
+ file = dir + '/' + file;
+
+ // determine if file or directory
+ fs.stat(file, function(err, stat) {
+
+ if (stat && stat.isDirectory()) {
+
+ // push as directory
+ results.push('directory:' + file);
+ recurseCoffeeDirectory(file, function(err, res) {
+ results = results.concat(res);
+ if (!--pending) done(null, results);
+
+ });
+
+ } else {
+
+ // push as file
+ results.push('file:' + file);
+ if (!--pending) done(null, results);
+
+ }
+
+ });
+ });
+ });
+
+ };
+
+
+ //watches a file for changes
+ var fileHasChanged = function(event, filename){
+
+ console.log(color.blue + '[brew] change detected to file, recompiling' + color.reset);
+ compileTemplates();
+
+ };
+
+
+ // watches a directory for changes
+ var directoryHasChanged = function(event, filename){
+
+ console.log(color.blue + '[brew] new or removed file detected, recompiling' + color.reset);
+ readAndCompile(coffee.in, coffee.watch);
+
+ };
+
+ var watchers = []
+ var unwatchAll = function(){
+
+ for(var w = 0; w < watchers.length; w++){
+ watchers[w].close();
+ }
+
+ }
+
+ //compiles to output destination
+ var compileTemplates = function(){
+
+
+ out = []
+
+
+ try {
+
+ //console.log(coffee.directories)
+
+ // scope all the directories as objects for the begining of the file
+ for(var d = 0; d < coffee.directories.length; d++){
+
+ object = coffee.directories[d].namespace.replace(/\//g,'.');
+ out.push(object + ' = {}\n');
+
+ }
+
+ // add the __ methods required for class inheritance
+ out.push('\n');
+ out.push('__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n');
+ out.push('__hasProp = {}.hasOwnProperty,\n');
+ out.push('__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n');
+
+ // compile all the coffee scripts
+ out.push('\n');
+
+ for(var s = 0; s < coffee.scripts.length; s++){
+ data = fs.readFileSync(coffee.scripts[s].file, 'utf8');
+ compiled = coffeescript.compile(data, {bare:true})
+
+ // hack off var Whatever line
+ compiled = compiled.substr(compiled.indexOf('\n\n'), compiled.length);
+
+ // trim so we can rescope objects based on the directory structure
+ compiled = compiled.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ spaced = coffee.scripts[s].namespace.substr(0, coffee.scripts[s].namespace.lastIndexOf('/')).replace(/\//g,'.')
+
+ out.push(spaced + '.' + compiled + '\n')
+
+ }
+
+ } catch (e) {
+
+ console.log(color.red + '[brew] warning, a file was deleted ' + color.reset + e);
+
+ }
+
+ output = out.join('');
+
+ if(coffee.minify){
+
+ var ast = uglify.parser.parse(output);
+ ast = uglify.uglify.ast_mangle(ast);
+ ast = uglify.uglify.ast_squeeze(ast);
+ output = uglify.uglify.gen_code(ast);
+
+ }
+
+ //write the output file
+ try {
+
+ fs.writeFileSync(coffee.out, output, 'utf8');
+ console.log(color.green + '[brew] compiled ' + coffee.in + ' to ' + coffee.out + color.reset);
+
+ } catch(e){
+
+ console.log(color.red + '[brew] ERROR! destination file or directory does not exist.' + color.reset + '\n:' + e);
+
+ }
+
+
+ };
+
+
+ var readAndCompile = function(dir, watch){
+
+ coffee.scripts = []
+ coffee.directories = []
+
+ // unwatch all the files
+ unwatchAll();
+
+ //read files in the directory
+ recurseCoffeeDirectory(dir, function(err, files) {
+
+ try {
+
+ if(err)
+ throw new Error('directory does not exists: ' + dir)
+
+ source_dir = coffee.in.toString();
+ for(var f = 0; f < files.length; f++){
+
+ // determine whether or not it's a file or directory.
+ info = files[f].split(':')
+
+ if( info[0] == 'file' && info[1].indexOf('.coffee') > 0 ){
+
+ // watch the file
+ if(watch) {
+
+ watchers.push(fs.watch(info[1], fileHasChanged))
+
+ }
+
+ // get the template namespace by using the extra directory
+ file_and_dir = info[1].substr( (info[1].indexOf(dir) + dir.length) + 1, info[1].length);
+ namespaced = file_and_dir.replace(/\.coffee/,'');
+
+ // push object for the compiler to work with
+ coffee.scripts.push({
+ namespace: namespaced,
+ file: info[1]
+ })
+
+
+ } else if ( info[0] == 'directory') {
+
+ namespaced = info[1].substr( (info[1].indexOf(source_dir) + source_dir.length) + 1, info[1].length);
+ coffee.directories.push({
+ namespace: namespaced,
+ directory: info[0]
+ })
+
+ // watch the directory for new / removed files
+ if(watch){
+
+ watchers.push(fs.watch(info[1], directoryHasChanged))
+
+ }
+
+ }
+
+ }
+
+ compileTemplates();
+
+ } catch (e){
+
+ console.log(color.red + '[brew] ERROR! check to be sure your directories exist. ' + color.reset + "\n" + e + "\n");
+ console.log('[brew] input directory: ' + dir);
+ console.log('[brew] destination file: ' + coffee.out + "\n");
+ if(coffee.help)
+ console.log(coffee.help)
+
+ }
+
+ });
+
+ }
+
+
+// export functions for module use
+exports.configure = function(config){ coffee = config; }
+exports.watch = function(){
+
+ console.log(color.yellow + '[brew] watching template directory ' + coffee.in + color.reset);
+ coffee.watch = true;
+ readAndCompile(coffee.in, true);
+
+}
+
+exports.compile = function(){
+ coffee.watch = false;
+ readAndCompile(coffee.in, false);
+
+}
+
+
+})()
+
+
+
View
86 node/dependency.js
@@ -0,0 +1,86 @@
+
+// wraps up vendors into a single dependencies.js file
+fs = require('fs')
+
+var watcher = null;
+
+var deps = {
+ in: './app/vendor/',
+ out: './public/javascript/dependencies.js',
+ files: []
+}
+
+var color = {
+ red : '\u001b[31m',
+ blue: '\u001b[36m',
+ green: '\u001b[32m',
+ yellow: '\u001b[33m',
+ reset: '\u001b[0m'
+}
+
+var changed = function(){
+
+ console.log(color.blue + '[dependency] new or renamed file deteted, re-concatenating' + color.reset);
+ if(watcher)
+ watcher.close();
+ concat(true);
+
+}
+
+var concat = function(watch){
+
+
+ readThenWrite();
+ if(watch)
+ watcher = fs.watch(deps.in, changed);
+
+}
+
+var readThenWrite = function(){
+
+ files = []
+ try {
+
+ // loop over directory and compile files
+
+ fs.readdir( deps.in, function( err, list ) {
+
+ for(var l = 0; l < list.length; l++){
+
+ js = fs.readFileSync(deps.in + '/' + list[l], 'utf8');
+ files.push(js);
+
+ }
+
+ write(files);
+
+ });
+
+ } catch (e) {
+
+ console.log(color.red + '[dependency] ERROR: could not read dependencies from : ' + deps.in + color.reset)
+
+ }
+
+}
+
+var write = function(files){
+
+
+ try{
+
+ fs.writeFileSync(deps.out, files.join('\n'), 'utf8');
+ console.log(color.green + '[depencendcy] concatenated dependencies to ' + deps.out + color.reset);
+
+ } catch (e) {
+
+ console.log(color.red + '[dependency] ERROR: could not write file to : ' + deps.out + color.reset + e);
+
+ }
+
+
+}
+
+exports.on = function(config) { deps = config; }
+exports.watch = function(){ concat(true); };
+exports.conact = concat;
View
57 node/flint.js
@@ -0,0 +1,57 @@
+
+// flint command line tool
+optimist = require('optimist');
+fs = require('fs');
+
+brew = require('./coffee');
+style = require('./styler');
+depend = require('./dependency');
+ride = require('handlebar-rider');
+
+/*
+// get optimist options
+argv = optimist
+ .usage('\nFlint: Full stack coffeescript development.\nCommand Line Use: ')
+
+
+ .demand(' ')
+
+.argv
+*/
+
+// wrap dependencies
+//depencency = {
+// in: '/Users/benipsen/Sites/flybook/app/vendor',
+// out: '/Users/benipsen/Sites/flybook/public/javascript/dependencies.js'
+//}
+//depend.on(depencency);
+depend.watch();
+
+
+// brew the coffee
+//coffee_maker = {
+// in: '/Users/benipsen/Sites/flybook/app/coffee',
+// out: '/Users/benipsen/Sites/flybook/public/javascript/application.js'
+//}
+//brew.configure(coffee_maker);
+brew.watch();
+
+// run the styler
+//style_guide = {
+// in:'/Users/benipsen/Sites/flybook/app/stylus/',
+// out:'/Users/benipsen/Sites/flybook/public/application.css'
+//}
+//style.configure(style_guide)
+style.watch()
+
+
+// ride on the handlebars
+//bike = {
+// in:'/Users/benipsen/Sites/flybook/app/handlebars/',
+// out:'/Users/benipsen/Sites/flybook/public/javascript/templates.js',
+// minify: true
+//}
+//ride.configure(bike)
+ride.watch()
+
+
View
152 node/styler.js
@@ -0,0 +1,152 @@
+
+// compiles anything in the stylus directory into a single css application.css file
+
+stylus = require('stylus');
+fs = require('fs');
+
+(function(){
+
+ var files = []
+ var config = {
+ in: './app/stylus',
+ out: './public/application.css'
+ }
+
+ //colored output
+ var color = {
+ red : '\u001b[31m',
+ blue: '\u001b[36m',
+ green: '\u001b[32m',
+ yellow: '\u001b[33m',
+ reset: '\u001b[0m'
+ }
+
+ var directoryHasChanged = function(event, filename){
+
+ console.log(color.blue + '[styler] new or renamed file deteted, recompiling css' + color.reset);
+ unwatchAll();
+ watch(config.in, true);
+
+ }
+
+ var fileHasChanged = function(event, filename){
+
+ console.log(color.blue + '[styler] change detected to file, recompiling css' + color.reset);
+ unwatchAll();
+ watch(config.in, true);
+
+ }
+
+ var watchers = []
+ var unwatchAll = function(){
+
+ for(var w = 0; w < watchers.length; w++){
+ watchers[w].close();
+ }
+
+ }
+
+ var directory_watch = false;
+ var watch = function(dir, skip_message){
+
+ if(!dir) dir = config.in
+ config.in = dir
+
+ if(directory_watch) directory_watch.close()
+ directory_watch = fs.watch(config.in, directoryHasChanged);
+
+ if(!skip_message) console.log(color.yellow + '[styler] watching stylus directory: ' + dir + color.reset);
+ compile(dir, true)
+
+ }
+
+ var compile = function(dir, watch){
+
+ if(!dir) dir = config.in
+ config.in = dir
+ files = readFiles(dir, watch);
+
+ }
+
+ var buildOutput = function(files){
+
+ try {
+ //read in all the styles
+ styl = []
+ for(var f = 0; f < files.length; f++){
+ styl.push( fs.readFileSync(files[f], 'utf8') );
+ }
+
+ // run it through the styler
+ stylus.render (styl.join(''), {filename: 'application.css'}, function(err, css){
+
+ if (err) throw err;
+
+ writeCssFile(css);
+
+
+ });
+
+ } catch (e) {
+
+ console.log(color.red + '[styler] Error compiling stylus: ' + color.reset);
+ console.log(e);
+
+ }
+
+ }
+
+ var readFiles = function(dir, watch){
+
+ fs.readdir( dir, function( err, list ) {
+
+ try{
+
+ if(err) throw err
+ _files = []
+
+ for(var l = 0; l < list.length; l++){
+
+ if(list[l].indexOf('.styl') > 0){
+ _files.push(dir + '/' + list[l])
+ if(watch)
+ watchers.push(fs.watch(dir + '/' + list[l], fileHasChanged));
+ }
+
+ }
+
+ buildOutput(_files)
+
+ } catch (e) {
+
+ console.log(color.red + '[styler] Cound not read stylus directory: ' + dir + color.reset);
+ console.log(e);
+
+ }
+
+ });
+
+
+ }
+
+ var writeCssFile = function(css){
+
+ try {
+
+ // output the css
+ fs.writeFileSync(config.out, css, 'utf8');
+ console.log(color.green + '[styler] compiled css output to ' + config.out + color.reset);
+
+ } catch(e){
+
+ console.log(color.red + '[styler] ERROR! Destination file or directory does not exist.' + color.reset + '\n:' + e);
+
+ }
+
+ }
+
+ exports.configure = function(cfg){ config = cfg };
+ exports.compile = compile;
+ exports.watch = watch;
+
+})()
View
1  node_modules/.bin/cake
View
1  node_modules/.bin/coffee
View
1  node_modules/.bin/handlebar-rider
View
1  node_modules/.bin/stylus
View
1  node_modules/.bin/toaster
View
1  node_modules/.bin/uglifyjs
View
1  node_modules/coffee-script
View
0  toaster.coffee → node_modules/express-resource/.gitmodules
File renamed without changes
View
2  node_modules/express-resource/.npmignore
@@ -0,0 +1,2 @@
+support
+test
View
51 node_modules/express-resource/History.md
@@ -0,0 +1,51 @@
+
+0.2.4 / 2011-12-28
+==================
+
+ * Fixed windows path join. Closes #43
+ * Fixed _examples/user.js_
+ * Fixed resource id when multiple segments are present. Closes #36
+
+0.2.3 / 2011-09-23
+==================
+
+ * Fixed logic to allow actions to be defined in any order [Wompt]
+
+0.2.2 / 2011-09-08
+==================
+
+ * Added support to allow root resources to have nested resources
+ * Added auto-load signature support of `(req, id, callback)`
+
+0.2.1 / 2011-05-25
+==================
+
+ * Fixed for express 2.3.9. Closes #18
+ * Added better support for mapping your own actions. Closes #7
+
+0.2.0 / 2011-04-09
+==================
+
+ * Added basic content-negotiation support via format extensions
+ * Added nested resource support
+ * Added auto-loading support, populating `req.user` etc automatically
+ * Added another options param to `app.resource()`
+ * Added `Resource#[http-verb]()` methods to define additional routes
+ * Added `Resource#map(method, path, fn)`
+ * Changed; every `Resource` has a `.base`
+ * Changed; resource id is no longer "id", it's a singular version of the resource name, aka `req.params.user` etc
+
+0.1.0 / 2011-03-27
+==================
+
+ * Added support for top-level resources [Daniel Gasienica]
+
+0.0.2 / 2011-03-03
+==================
+
+ * Added Express 2.0 support
+
+0.0.1 / 2010-09-06
+==================
+
+ * Initial release
View
6 node_modules/express-resource/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @./node_modules/expresso/bin/expresso \
+ -I support
+
+.PHONY: test
View
194 node_modules/express-resource/Readme.md
@@ -0,0 +1,194 @@
+# Express Resource
+
+ express-resource provides resourceful routing to express.
+
+## Installation
+
+npm:
+
+ $ npm install express-resource
+
+## Usage
+
+ To get started simply `require('express-resource')`, and this module will monkey-patch Express, enabling resourceful routing by providing the `app.resource()` method. A "resource" is simply an object, which defines one of more of the supported "actions" listed below:
+
+ exports.index = function(req, res){
+ res.send('forum index');
+ };
+
+ exports.new = function(req, res){
+ res.send('new forum');
+ };
+
+ exports.create = function(req, res){
+ res.send('create forum');
+ };
+
+ exports.show = function(req, res){
+ res.send('show forum ' + req.params.forum);
+ };
+
+ exports.edit = function(req, res){
+ res.send('edit forum ' + req.params.forum);
+ };
+
+ exports.update = function(req, res){
+ res.send('update forum ' + req.params.forum);
+ };
+
+ exports.destroy = function(req, res){
+ res.send('destroy forum ' + req.params.forum);
+ };
+
+The `app.resource()` method returns a new `Resource` object, which can be used to further map pathnames, nest resources, and more.
+
+ var express = require('express')
+ , Resource = require('express-resource')
+ , app = express.createServer();
+
+ app.resource('forums', require('./forum'));
+
+## Default Action Mapping
+
+Actions are then mapped as follows (by default), providing `req.params.forum` which contains the substring where ":forum" is shown below:
+
+ GET /forums -> index
+ GET /forums/new -> new
+ POST /forums -> create
+ GET /forums/:forum -> show
+ GET /forums/:forum/edit -> edit
+ PUT /forums/:forum -> update
+ DELETE /forums/:forum -> destroy
+
+## Top-Level Resource
+
+Specify a top-level resource by omitting the resource name:
+
+ app.resource(require('./forum'));
+
+Top-level actions are then mapped as follows (by default):
+
+ GET / -> index
+ GET /new -> new
+ POST / -> create
+ GET /:id -> show
+ GET /:id/edit -> edit
+ PUT /:id -> update
+ DELETE /:id -> destroy
+
+## Auto-Loading
+
+Resources have the concept of "auto-loading" associated data. For example we can pass a "load" property along with our actions, which should invoke the callback function with an error, or the object such as a `User`:
+
+
+ User.load = function(id, fn) {
+ fn(null, users[id]);
+ };
+
+ // or
+
+ User.load = function(req, id, fn) {
+ fn(null, users[id]);
+ };
+
+ app.resource('users', { show: ..., load: User.load });
+
+ With the auto-loader defined, the `req.user` object will be available now be available to the actions automatically. We may pass the "load" option as the third param as well, although this is equivalent to above, but allows you to either export ".load" along with your actions, or passing it explicitly:
+
+ app.resource('users', require('./user'), { load: User.load });
+
+ Finally we can utilize the `Resource#load(fn)` method, which again is functionally equivalent:
+
+ var user = app.resource('users', require('./user'));
+ user.load(User.load);
+
+ This functionality works when nesting resources as well, for example suppose we have a forum, which contains threads, our setup may look something like below:
+
+ var forums = app.resource('forums', require('resources/forums'), { load: Forum.get });
+ var threads = app.resource('threads', require('resources/threads'), { load: Thread.get });
+
+ forums.add(threads);
+
+ Now when we request `GET /forums/5/threads/12` both the `req.forum` object, and `req.thread` will be available to thread's _show_ action.
+
+## Content-Negotiation
+
+ Currently express-resource supports basic content-negotiation support utilizing extnames or "formats". This can currently be done two ways, first we may define actions as we normally would, and utilize the `req.format` property, and respond accordingly. The following would respond to `GET /pets.xml`, and `GET /pets.json`.
+
+ var pets = ['tobi', 'jane', 'loki'];
+
+ exports.index = function(req, res){
+ switch (req.format) {
+ case 'json':
+ res.send(pets);
+ break;
+ case 'xml':
+ res.send('<pets>' + pets.map(function(pet){
+ return '<pet>' + pet + '</pet>';
+ }).join('') + '</pets>');
+ break;
+ default:
+ res.send(406);
+ }
+ };
+
+ The following is equivalent, however we separate the logic into several callbacks, each representing a format.
+
+ exports.index = {
+ json: function(req, res){
+ res.send(pets);
+ },
+
+ xml: function(req, res){
+ res.send('<pets>' + pets.map(function(pet){
+ return '<pet>' + pet + '</pet>';
+ }).join('') + '</pets>');
+ }
+ };
+
+ We may also provide a `default` format, invoked when either no extension is given, or one that does not match another method is given:
+
+
+ exports.default = function(req, res){
+ res.send('Unsupported format "' + req.format + '"', 406);
+ };
+
+ To assign a default format to an existing method, we can provide the `format` option to the resource. With the following definition both `GET /users/5` and `GET /users/5.json` will invoke the `show.json` action, or `show` with `req.format = 'json'`.
+
+ app.resource('users', actions, { format: 'json' });
+
+## Running Tests
+
+First make sure you have the submodules:
+
+ $ git submodule update --init
+
+Then run the tests:
+
+ $ make test
+
+## License
+
+ The MIT License
+
+ Copyright (c) 2010-2011 TJ Holowaychuk <tj@vision-media.ca>
+ Copyright (c) 2011 Daniel Gasienica <daniel@gasienica.ch>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ 'Software'), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
54 node_modules/express-resource/examples/content-negotiation.js
@@ -0,0 +1,54 @@
+
+require.paths.unshift(__dirname + '/../support');
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , resource = require('../')
+ , app = express.createServer();
+
+var db = ['tobi', 'loki', 'jane']
+ , toys = ['ball', 'tunnel'];
+
+var pet = {
+ index: {
+ json: function(req, res){
+ res.send(db);
+ },
+
+ default: function(req, res){
+ res.send(db.join(', '), { 'Content-Type': 'text/plain' });
+ }
+ }
+};
+
+var pets = app.resource('pets', pet);
+
+pets.load(function(id, fn){
+ fn(null, db[id]);
+});
+
+// GET /pets/toys.xml
+// this action must be defined above
+// the one below as the :pet placeholder
+// will otherwise match "/toys".
+
+pets.get('/toys', {
+ xml: function(req, res){
+ res.send('<toys>' + toys.map(function(toy){
+ return '<toy>' + toy + '</toy>';
+ }).join('\n') + '</toys>');
+ }
+});
+
+// GET /pets/1.xml
+
+pets.get({
+ xml: function(req, res){
+ res.send('<pet>' + req.pet + '</pet>');
+ }
+});
+
+app.listen(3000);
View
34 node_modules/express-resource/examples/controllers/forum.js
@@ -0,0 +1,34 @@
+
+exports.index = function(req, res){
+ res.send('forum index');
+};
+
+exports.new = function(req, res){
+ res.send('new forum');
+};
+
+exports.create = function(req, res){
+ res.send('create forum');
+};
+
+exports.show = function(req, res){
+ res.send('show forum ' + req.forum.title);
+};
+
+exports.edit = function(req, res){
+ res.send('edit forum ' + req.forum.title);
+};
+
+exports.update = function(req, res){
+ res.send('update forum ' + req.forum.title);
+};
+
+exports.destroy = function(req, res){
+ res.send('destroy forum ' + req.forum.title);
+};
+
+exports.load = function(id, fn){
+ process.nextTick(function(){
+ fn(null, { title: 'Ferrets' });
+ });
+};
View
26 node_modules/express-resource/examples/controllers/thread.js
@@ -0,0 +1,26 @@
+
+exports.index = function(req, res){
+ res.send('forum ' + req.forum.title + ' threads');
+};
+
+exports.new = function(req, res){
+ res.send('new forum ' + req.forum.title + ' thread');
+};
+
+exports.create = function(req, res){
+ res.send('forum ' + req.forum.title + ' thread created');
+};
+
+exports.show = function(req, res){
+ res.send('forum ' + req.forum.title + ' thread ' + req.thread.title);
+};
+
+exports.edit = function(req, res){
+ res.send('editing forum ' + req.forum.title + ' thread ' + req.thread.title);
+};
+
+exports.load = function(id, fn){
+ process.nextTick(function(){
+ fn(null, { title: 'How do you take care of ferrets?' });
+ });
+};
View
16 node_modules/express-resource/examples/nesting.js
@@ -0,0 +1,16 @@
+
+require.paths.unshift(__dirname + '/../support');
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , resource = require('../')
+ , app = express.createServer();
+
+var forums = app.resource('forums', require('./controllers/forum'));
+var threads = app.resource('threads', require('./controllers/thread'));
+forums.add(threads);
+
+app.listen(3000);
View
22 node_modules/express-resource/examples/root.js
@@ -0,0 +1,22 @@
+
+require.paths.unshift(__dirname + '/../support');
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , resource = require('../')
+ , app = express.createServer();
+
+app.resource({
+ index: function(req, res){
+ res.send('index page');
+ },
+
+ show: function(req, res){
+ res.send('item ' + req.params.id);
+ }
+});
+
+app.listen(3000);
View
50 node_modules/express-resource/examples/user.js
@@ -0,0 +1,50 @@
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , resource = require('../')
+ , app = express.createServer();
+
+var users = ['tobi', 'loki', 'jane'];
+
+var user = {
+ index: function(req, res){
+ switch (req.format) {
+ case 'json':
+ res.send(users);
+ break;
+ default:
+ res.contentType('txt');
+ res.send(users.join(', '));
+ }
+ },
+
+ show: function(req, res){
+ var user = users[req.params.user];
+ res.send(user);
+ },
+
+ edit: function(req, res){
+ res.send('editing ' + req.params.user);
+ },
+
+ destroy: function(req, res){
+ delete users[req.params.user];
+ res.send('removed ' + req.params.user);
+ },
+
+ login: function(req, res){
+ res.send('logged in ' + req.params.user);
+ },
+
+ logout: function(req, res){
+ res.send('logged out');
+ }
+};
+
+var userResource = app.resource('users', user);
+userResource.map('get', 'login', user.login); // relative path accesses element (/users/1/login)
+userResource.map('get', '/logout', user.logout); // absolute path accesses collection (/users/logout)
+
+app.listen(3000);
View
262 node_modules/express-resource/index.js
@@ -0,0 +1,262 @@
+
+/*!
+ * Express - Resource
+ * Copyright(c) 2010-2011 TJ Holowaychuk <tj@vision-media.ca>
+ * Copyright(c) 2011 Daniel Gasienica <daniel@gasienica.ch>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , lingo = require('lingo')
+ , en = lingo.en;
+
+/**
+ * Pre-defined action ordering.
+ */
+
+var orderedActions = [
+ 'index' // GET /
+ ,'new' // GET /new
+ ,'create' // POST /
+ ,'show' // GET /:id
+ ,'edit' // GET /edit/:id
+ ,'update' // PUT /:id
+ ,'destroy' // DEL /:id
+];
+
+/**
+ * Initialize a new `Resource` with the given `name` and `actions`.
+ *
+ * @param {String} name
+ * @param {Object} actions
+ * @param {Server} app
+ * @api private
+ */
+
+var Resource = module.exports = function Resource(name, actions, app) {
+ this.name = name;
+ this.app = app;
+ this.routes = {};
+ actions = actions || {};
+ this.base = actions.base || '/';
+ if ('/' != this.base[this.base.length - 1]) this.base += '/';
+ this.format = actions.format;
+ this.id = actions.id || this.defaultId;
+ this.param = ':' + this.id;
+
+ // default actions
+ for (var i=0, key; i < orderedActions.length; i++) {
+ key = orderedActions[i];
+ if (actions[key]) this.mapDefaultAction(key, actions[key]);
+ }
+
+ // auto-loader
+ if (actions.load) this.load(actions.load);
+};
+
+/**
+ * Set the auto-load `fn`.
+ *
+ * @param {Function} fn
+ * @return {Resource} for chaining
+ * @api public
+ */
+
+Resource.prototype.load = function(fn){
+ var self = this
+ , id = this.id;
+
+ this.loadFunction = fn;
+ this.app.param(this.id, function(req, res, next){
+ function callback(err, obj){
+ if (err) return next(err);
+ // TODO: ideally we should next() passed the
+ // route handler
+ if (null == obj) return res.send(404);
+ req[id] = obj;
+ next();
+ };
+
+ // Maintain backward compatibility
+ if (2 == fn.length) {
+ fn(req.params[id], callback);
+ } else {
+ fn(req, req.params[id], callback);
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Retun this resource's default id string.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Resource.prototype.__defineGetter__('defaultId', function(){
+ return this.name
+ ? en.singularize(this.name.split('/').pop())
+ : 'id';
+});
+
+/**
+ * Map http `method` and optional `path` to `fn`.
+ *
+ * @param {String} method
+ * @param {String|Function|Object} path
+ * @param {Function} fn
+ * @return {Resource} for chaining
+ * @api public
+ */
+
+Resource.prototype.map = function(method, path, fn){
+ var self = this
+ , orig = path;
+
+ if (method instanceof Resource) return this.add(method);
+ if ('function' == typeof path) fn = path, path = '';
+ if ('object' == typeof path) fn = path, path = '';
+ if ('/' == path[0]) path = path.substr(1);
+ else path = path ? this.param + '/' + path : this.param;
+ method = method.toLowerCase();
+
+ // setup route pathname
+ var route = this.base + (this.name || '');
+ if (this.name && path) route += '/';
+ route += path;
+ route += '.:format?';
+
+ // register the route so we may later remove it
+ (this.routes[method] = this.routes[method] || {})[route] = {
+ method: method
+ , path: route
+ , orig: orig
+ , fn: fn
+ };
+
+ // apply the route
+ this.app[method](route, function(req, res, next){
+ req.format = req.params.format || req.format || self.format;
+ if (req.format) res.contentType(req.format);
+ if ('object' == typeof fn) {
+ if (req.format && fn[req.format]) {
+ fn[req.format](req, res, next);
+ } else if (fn.default) {
+ fn.default(req, res, next);
+ } else {
+ res.send(406);
+ }
+ } else {
+ fn(req, res, next);
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Nest the given `resource`.
+ *
+ * @param {Resource} resource
+ * @return {Resource} for chaining
+ * @see Resource#map()
+ * @api public
+ */
+
+Resource.prototype.add = function(resource){
+ var app = this.app
+ , routes
+ , route;
+
+ // relative base
+ resource.base = this.base
+ + (this.name ? this.name + '/': '')
+ + this.param + '/';
+
+ // re-define previous actions
+ for (var method in resource.routes) {
+ routes = resource.routes[method];
+ for (var key in routes) {
+ route = routes[key];
+ delete routes[key];
+ app[method](key).remove();
+ resource.map(route.method, route.orig, route.fn);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Map the given action `name` with a callback `fn()`.
+ *
+ * @param {String} key
+ * @param {Function} fn
+ * @api private
+ */
+
+Resource.prototype.mapDefaultAction = function(key, fn){
+ switch (key) {
+ case 'index':
+ this.get('/', fn);
+ break;
+ case 'new':
+ this.get('/new', fn);
+ break;
+ case 'create':
+ this.post('/', fn);
+ break;
+ case 'show':
+ this.get(fn);
+ break;
+ case 'edit':
+ this.get('edit', fn);
+ break;
+ case 'update':
+ this.put(fn);
+ break;
+ case 'destroy':
+ this.del(fn);
+ break;
+ }
+};
+
+/**
+ * Setup http verb methods.
+ */
+
+express.router.methods.concat(['del', 'all']).forEach(function(method){
+ Resource.prototype[method] = function(path, fn){
+ if ('function' == typeof path
+ || 'object' == typeof path) fn = path, path = '';
+ this.map(method, path, fn);
+ return this;
+ }
+});
+
+/**
+ * Define a resource with the given `name` and `actions`.
+ *
+ * @param {String|Object} name or actions
+ * @param {Object} actions
+ * @return {Resource}
+ * @api public
+ */
+
+express.HTTPServer.prototype.resource =
+express.HTTPSServer.prototype.resource = function(name, actions, opts){
+ var options = actions || {};
+ if ('object' == typeof name) actions = name, name = null;
+ if (options.id) actions.id = options.id;
+ this.resources = this.resources || {};
+ if (!actions) return this.resources[name] || new Resource(name, null, this);
+ for (var key in opts) options[key] = opts[key];
+ var res = this.resources[name] = new Resource(name, actions, this);
+ return res;
+};
View
3  node_modules/express-resource/node_modules/lingo/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "support/expresso"]
+ path = support/expresso
+ url = git://github.com/visionmedia/expresso.git
View
1  node_modules/express-resource/node_modules/lingo/.npmignore
@@ -0,0 +1 @@
+node_modules
View
28 node_modules/express-resource/node_modules/lingo/History.md
@@ -0,0 +1,28 @@
+
+0.0.5 / 2012-08-03
+==================
+
+ * add mocha
+ * add whitelist of "video" and "rodeo"
+
+0.0.4 / 2010-11-27
+==================
+
+ * Added `Language#name` [Pau Ramon]
+ * Added Spanish inflector (needs more testing) [Pau Ramon]
+
+0.0.3 / 2010-10-25
+==================
+
+ * Fixed _index.js_ making lingo useless from npm
+
+0.0.2 / 2010-09-27
+==================
+
+ * Added `lingo.join()`
+ * Added i18n support
+
+0.0.1 / 2010-09-27
+==================
+
+ * Initial release
View
22 node_modules/express-resource/node_modules/lingo/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
17 node_modules/express-resource/node_modules/lingo/Makefile
@@ -0,0 +1,17 @@
+
+test:
+ @./node_modules/.bin/mocha --ui exports
+
+docs: index.html
+
+index.html: $(shell find lib -type f)
+ dox \
+ --title "Lingo" \
+ --desc "Linguistics module for [Node](http://nodejs.org) providing inflection, transformations and more." \
+ --ribbon "http://github.com/visionmedia/lingo" \
+ $^ > $@
+
+docclean:
+ rm -f index.html
+
+.PHONY: test docs docclean
View
128 node_modules/express-resource/node_modules/lingo/Readme.md
@@ -0,0 +1,128 @@
+
+# Lingo
+
+ Lingo is a linguistics module, currently providing inflection and some string transformations. Eventually I would like to extend its capabilities and add additional languages.
+
+## Installation
+
+ $ npm install lingo
+
+## Annotated Source
+
+ Can be viewed [here](http://visionmedia.github.com/lingo).
+
+## Inflection
+
+Lingo provides English inflection rules by default, which of course can be extended. View _./lib/languages/en.js_ for more information.
+
+### Language#pluralize()
+
+Convert a singular word to it's plural alternative:
+
+ en.pluralize('fox');
+ // => "foxes"
+
+### Language#singularize()
+
+Convert a plural word to it's singular alternative:
+
+ en.singularize('foxes');
+ // => "fox"
+
+### Language#isPlural()
+
+Check if a word is plural:
+
+ en.isPlural('foxes');
+ // => true
+
+ en.isPlural('fox');
+ // => false
+
+### Language#isSingular()
+
+Check if a word is singular:
+
+ en.isSingular('fox');
+ // => true
+
+ en.isSingular('foxes');
+ // => false
+
+## Transformations
+
+### lingo.capitalize()
+
+Capitalize the first word of a string:
+
+ lingo.capitalize('hello there');
+ // => "Hello there"
+
+Capitalize all words:
+
+ lingo.capitalize('hello there', true);
+ // => "Hello There"
+
+### lingo.camelcase()
+
+Camelcase a string:
+
+ lingo.camelcase('foo bar');
+ // => "fooBar"
+
+Camelcase with first character upppercase:
+
+ lingo.camelcase('foo bar baz', true);
+ // => "FooBarBaz"
+
+## lingo.join()
+
+Defaults to "and":
+
+ lingo.join(['fruits', 'veggies', 'sugar']);
+ // => "fruits, veggies and sugar"
+
+Supplying "or":
+
+ lingo.join(['fruits', 'veggies', 'sugar'], 'or');
+ // => "fruits, veggies or sugar"
+
+## i18n (translations)
+
+New languages can be defined as shown below:
+
+ var Language = require('lingo').Language
+ , fr = new Language('fr');
+
+ fr.translations = {
+ 'Welcome {name}': 'Bonjour {name}'
+ };
+
+The language code passed to `Language()` self-registers itself, so you could grab the implementation via:
+
+ var fr = require('lingo').fr;
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
572 node_modules/express-resource/node_modules/lingo/index.html
@@ -0,0 +1,572 @@
+<a href="http://github.com/visionmedia/lingo"><img alt="Fork me on GitHub" id="ribbon" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a><html>
+ <head>
+ <title>Lingo</title>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <style>body {
+ margin: 0;
+ padding: 0;
+ font: 14px/1.5 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
+ color: #252519;
+}
+a {
+ color: #252519;
+}
+a:hover {
+ text-decoration: underline;
+ color: #19469D;
+}
+p {
+ margin: 12px 0;
+}
+h1, h2, h3 {
+ margin: 0;
+ padding: 0;
+}
+table#source {
+ width: 100%;
+ border-collapse: collapse;
+}
+table#source td:first-child {
+ padding: 30px 40px 30px 40px;
+ vertical-align: top;
+}
+table#source td:first-child,
+table#source td:first-child pre {
+ width: 450px;
+}
+table#source td:last-child {
+ padding: 30px 0 30px 40px;
+ border-left: 1px solid #E5E5EE;
+ background: #F5F5FF;
+}
+table#source tr {
+ border-bottom: 1px solid #E5E5EE;
+}
+table#source tr.filename {
+ padding-top: 40px;
+ border-top: 1px solid #E5E5EE;
+}
+table#source tr.filename td:first-child {
+ text-transform: capitalize;
+}
+table#source tr.filename td:last-child {
+ font-size: 12px;
+}
+table#source tr.filename h2 {
+ margin: 0;
+ padding: 0;
+ cursor: pointer;
+}
+table#source tr.code h1,
+table#source tr.code h2,
+table#source tr.code h3 {
+ margin-top: 30px;
+ font-family: "Lucida Grande", "Helvetica Nueue", Arial, sans-serif;
+ font-size: 18px;
+}
+table#source tr.code h2 {
+ font-size: 16px;
+}
+table#source tr.code h3 {
+ font-size: 14px;
+}
+table#source tr.code ul {
+ margin: 15px 0 15px 35px;
+ padding: 0;
+}
+table#source tr.code ul li {
+ margin: 0;
+ padding: 1px 0;
+}
+table#source tr.code ul li p {
+ margin: 0;
+ padding: 0;
+}
+table#source tr.code td:first-child pre {
+ padding: 20px;
+}
+#ribbon {
+ position: fixed;
+ top: 0;
+ right: 0;
+}
+code .string { color: #219161; }
+code .regexp { color: #219161; }
+code .keyword { color: #954121; }
+code .number { color: #19469D; }
+code .comment { color: #bbb; }
+code .this { color: #19469D; }</style>
+ <script>
+ $(function(){
+ $('tr.code').hide();
+ $('tr.filename').toggle(function(){
+ $(this).nextUntil('.filename').fadeIn();
+ }, function(){
+ $(this).nextUntil('.filename').fadeOut();
+ });
+ });
+ </script>
+ </head>
+ <body>
+<table id="source"><tbody><tr><td><h1>Lingo</h1><p>Linguistics module for <a href="http://nodejs.org">Node</a> providing inflection, transformations and more.</p></td><td></td></tr><tr class="filename"><td><h2 id="lib/inflection.js"><a href="#">inflection</a></h2></td><td>lib/inflection.js</td></tr><tr class="code">
+<td class="docs">
+<p>Module dependencies.
+ </p>
+</td>
+<td class="code">
+<pre><code><span class="keyword">var</span> <span class="class">Language</span> = <span class="variable">require</span>(<span class="string">'./language'</span>);</code></pre>
+</td>
+</tr>
+<tr class="code">
+<td class="docs">
+<p>Check if a <code>word</code> is uncountable.</p>
+
+<h2></h2>
+
+<ul><li><p><strong>param</strong>: <em>String</em> word</p></li><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
+</td>
+<td class="code">
+<pre><code><span class="class">Language</span>.<span class="variable">prototype</span>.<span class="variable">isUncountable</span> = <span class="keyword">function</span>(<span class="variable">word</span>){
+ <span class="keyword">return</span> !!<span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">uncountable</span>[<span class="variable">word</span>];
+};</code></pre>
+</td>
+</tr>
+<tr class="code">
+<td class="docs">
+<p>Add an uncountable <code>word</code>.</p>
+
+<h2></h2>
+
+<ul><li><p><strong>param</strong>: <em>String</em> word</p></li><li><p><strong>return</strong>: <em>Language</em> for chaining</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
+</td>
+<td class="code">
+<pre><code><span class="class">Language</span>.<span class="variable">prototype</span>.<span class="variable">uncountable</span> = <span class="keyword">function</span>(<span class="variable">word</span>){
+ <span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">uncountable</span>[<span class="variable">word</span>] = <span class="variable">word</span>;
+ <span class="keyword">return</span> <span class="this">this</span>;
+};</code></pre>
+</td>
+</tr>
+<tr class="code">
+<td class="docs">
+<p>Add an irreglar <code>singular</code> / <code>plural</code> map.</p>
+
+<h2></h2>
+
+<ul><li><p><strong>param</strong>: <em>String</em> singular</p></li><li><p><strong>param</strong>: <em>String</em> plural</p></li><li><p><strong>return</strong>: <em>Language</em> for chaining</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
+</td>
+<td class="code">
+<pre><code><span class="class">Language</span>.<span class="variable">prototype</span>.<span class="variable">irregular</span> = <span class="keyword">function</span>(<span class="variable">singular</span>, <span class="variable">plural</span>){
+ <span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">irregular</span>.<span class="variable">plural</span>[<span class="variable">singular</span>] = <span class="variable">plural</span>;
+ <span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">irregular</span>.<span class="variable">singular</span>[<span class="variable">plural</span>] = <span class="variable">singular</span>;
+ <span class="keyword">return</span> <span class="this">this</span>;
+};</code></pre>
+</td>
+</tr>
+<tr class="code">
+<td class="docs">
+<p>Add a pluralization <code>rule</code> with the given <code>substitution</code>.</p>
+
+<h2></h2>
+
+<ul><li><p><strong>param</strong>: <em>RegExp</em> rule</p></li><li><p><strong>param</strong>: <em>String</em> substitution</p></li><li><p><strong>return</strong>: <em>Language</em> for chaining</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
+</td>
+<td class="code">
+<pre><code><span class="class">Language</span>.<span class="variable">prototype</span>.<span class="variable">plural</span> = <span class="keyword">function</span>(<span class="variable">rule</span>, <span class="variable">substitution</span>){
+ <span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">plural</span>.<span class="variable">unshift</span>([<span class="variable">rule</span>, <span class="variable">substitution</span>]);
+ <span class="keyword">return</span> <span class="this">this</span>;
+};</code></pre>
+</td>
+</tr>
+<tr class="code">
+<td class="docs">
+<p>Add a singularization <code>rule</code> with the given <code>substitution</code>.</p>
+
+<h2></h2>
+
+<ul><li><p><strong>param</strong>: <em>RegExp</em> rule</p></li><li><p><strong>param</strong>: <em>String</em> substitution</p></li><li><p><strong>return</strong>: <em>Language</em> for chaining</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
+</td>
+<td class="code">
+<pre><code><span class="class">Language</span>.<span class="variable">prototype</span>.<span class="variable">singular</span> = <span class="keyword">function</span>(<span class="variable">rule</span>, <span class="variable">substitution</span>){
+ <span class="this">this</span>.<span class="variable">rules</span>.<span class="variable">singular</span>.<span class="variable">unshift</span>([<span class="variable">rule</span>, <span class="variable">substitution</span>]);
+ <span class="keyword">return</span> <span class="this">this</span>;
+};</code></pre>
+</td>
+</tr>
+<