Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 28c87b371e0fe60693d82f4fae64e846bd5c9fa0 0 parents
@olivoil authored
Showing with 21,333 additions and 0 deletions.
  1. +35 −0 app.js
  2. +1 −0  node_modules/.bin/express
  3. +1 −0  node_modules/.bin/jade
  4. +1 −0  node_modules/.bin/mocha
  5. +1 −0  node_modules/.bin/mocha-debug
  6. +1 −0  node_modules/.bin/stylus
  7. +1 −0  node_modules/connect-assets/.gitignore
  8. +59 −0 node_modules/connect-assets/Cakefile
  9. +109 −0 node_modules/connect-assets/README.mdown
  10. +21 −0 node_modules/connect-assets/docs/DependencyGraph.html
  11. +45 −0 node_modules/connect-assets/docs/Middleware.html
  12. +202 −0 node_modules/connect-assets/docs/assets.html
  13. +39 −0 node_modules/connect-assets/docs/createHelpers.html
  14. +186 −0 node_modules/connect-assets/docs/docco.css
  15. +18 −0 node_modules/connect-assets/docs/parseDirectives.html
  16. +363 −0 node_modules/connect-assets/lib/assets.js
  17. +28 −0 node_modules/connect-assets/package.json
  18. +229 −0 node_modules/connect-assets/src/assets.coffee
  19. +55 −0 node_modules/connect-assets/test/AbsoluteIntegration.coffee
  20. +41 −0 node_modules/connect-assets/test/BenchmarkDynamic.coffee
  21. +41 −0 node_modules/connect-assets/test/BenchmarkStatic.coffee
  22. +209 −0 node_modules/connect-assets/test/DevelopmentIntegration.coffee
  23. +56 −0 node_modules/connect-assets/test/ProductionIntegration.coffee
  24. +16 −0 node_modules/connect-assets/test/RemoteIntegration.coffee
  25. +4 −0 node_modules/connect-assets/test/assets/css/button.styl
  26. +4 −0 node_modules/connect-assets/test/assets/css/gradient.styl
  27. +4 −0 node_modules/connect-assets/test/assets/css/mixins.styl
  28. +1 −0  node_modules/connect-assets/test/assets/css/normalize.css
  29. +4 −0 node_modules/connect-assets/test/assets/css/style.styl
  30. +1 −0  node_modules/connect-assets/test/assets/js/a.coffee
  31. +1 −0  node_modules/connect-assets/test/assets/js/addicts/codependent.coffee
  32. +1 −0  node_modules/connect-assets/test/assets/js/addicts/enabler.js
  33. +1 −0  node_modules/connect-assets/test/assets/js/b.coffee
  34. +2 −0  node_modules/connect-assets/test/assets/js/c.coffee
  35. +1 −0  node_modules/connect-assets/test/assets/js/chained-dependent.coffee
  36. +1 −0  node_modules/connect-assets/test/assets/js/coffee-dependency.coffee
  37. +3 −0  node_modules/connect-assets/test/assets/js/dependent.coffee
  38. +1 −0  node_modules/connect-assets/test/assets/js/js-dependency.js
  39. +1 −0  node_modules/connect-assets/test/assets/js/mindy.js
  40. +1 −0  node_modules/connect-assets/test/assets/js/moon_units/alpha.coffee
  41. +1 −0  node_modules/connect-assets/test/assets/js/moon_units/austin/powers.js
  42. +1 −0  node_modules/connect-assets/test/assets/js/moon_units/austin/texas.coffee
  43. +5 −0 node_modules/connect-assets/test/assets/js/moon_units/evil.coffee
  44. +1 −0  node_modules/connect-assets/test/assets/js/moon_units/zappa.coffee
  45. +1 −0  node_modules/connect-assets/test/assets/js/more/annoying.1.2.3.js
  46. +1 −0  node_modules/connect-assets/test/assets/js/mork.coffee
  47. +1 −0  node_modules/connect-assets/test/assets/js/narcissist.js
  48. +1 −0  node_modules/connect-assets/test/assets/js/needs-evil.coffee
  49. +1 −0  node_modules/connect-assets/test/assets/js/script.coffee
  50. +1 −0  node_modules/connect-assets/test/assets/js/starbucks/mocha.coffee
  51. +1 −0  node_modules/connect-assets/test/assets/js/subdir/nested/hobbits.coffee
  52. +5 −0 node_modules/connect-assets/test/assets/js/subdir/subdir-dependent.js
  53. +1 −0  node_modules/connect-assets/test/assets/js/tree-dependent.coffee
  54. +7 −0 node_modules/express/.npmignore
  55. +770 −0 node_modules/express/History.md
  56. +22 −0 node_modules/express/LICENSE
  57. +29 −0 node_modules/express/Makefile
  58. +145 −0 node_modules/express/Readme.md
  59. +428 −0 node_modules/express/bin/express
  60. +2 −0  node_modules/express/index.js
  61. +79 −0 node_modules/express/lib/express.js
  62. +583 −0 node_modules/express/lib/http.js
  63. +52 −0 node_modules/express/lib/https.js
  64. +321 −0 node_modules/express/lib/request.js
  65. +460 −0 node_modules/express/lib/response.js
  66. +53 −0 node_modules/express/lib/router/collection.js
  67. +398 −0 node_modules/express/lib/router/index.js
  68. +70 −0 node_modules/express/lib/router/methods.js
  69. +88 −0 node_modules/express/lib/router/route.js
  70. +152 −0 node_modules/express/lib/utils.js
  71. +457 −0 node_modules/express/lib/view.js
  72. +40 −0 node_modules/express/lib/view/partial.js
  73. +210 −0 node_modules/express/lib/view/view.js
  74. +11 −0 node_modules/express/node_modules/connect/.npmignore
  75. +24 −0 node_modules/express/node_modules/connect/LICENSE
  76. +2 −0  node_modules/express/node_modules/connect/index.js
  77. +81 −0 node_modules/express/node_modules/connect/lib/cache.js
  78. +106 −0 node_modules/express/node_modules/connect/lib/connect.js
  79. +217 −0 node_modules/express/node_modules/connect/lib/http.js
  80. +47 −0 node_modules/express/node_modules/connect/lib/https.js
  81. +46 −0 node_modules/express/node_modules/connect/lib/index.js
  82. +93 −0 node_modules/express/node_modules/connect/lib/middleware/basicAuth.js
  83. +189 −0 node_modules/express/node_modules/connect/lib/middleware/bodyParser.js
  84. +163 −0 node_modules/express/node_modules/connect/lib/middleware/compiler.js
  85. +46 −0 node_modules/express/node_modules/connect/lib/middleware/cookieParser.js
  86. +105 −0 node_modules/express/node_modules/connect/lib/middleware/csrf.js
  87. +222 −0 node_modules/express/node_modules/connect/lib/middleware/directory.js
  88. +100 −0 node_modules/express/node_modules/connect/lib/middleware/errorHandler.js
  89. +76 −0 node_modules/express/node_modules/connect/lib/middleware/favicon.js
  90. +82 −0 node_modules/express/node_modules/connect/lib/middleware/limit.js
  91. +299 −0 node_modules/express/node_modules/connect/lib/middleware/logger.js
  92. +38 −0 node_modules/express/node_modules/connect/lib/middleware/methodOverride.js
  93. +100 −0 node_modules/express/node_modules/connect/lib/middleware/profiler.js
  94. +40 −0 node_modules/express/node_modules/connect/lib/middleware/query.js
  95. +34 −0 node_modules/express/node_modules/connect/lib/middleware/responseTime.js
  96. +379 −0 node_modules/express/node_modules/connect/lib/middleware/router.js
  97. +346 −0 node_modules/express/node_modules/connect/lib/middleware/session.js
  98. +126 −0 node_modules/express/node_modules/connect/lib/middleware/session/cookie.js
  99. +131 −0 node_modules/express/node_modules/connect/lib/middleware/session/memory.js
  100. +137 −0 node_modules/express/node_modules/connect/lib/middleware/session/session.js
  101. +87 −0 node_modules/express/node_modules/connect/lib/middleware/session/store.js
  102. +225 −0 node_modules/express/node_modules/connect/lib/middleware/static.js
  103. +175 −0 node_modules/express/node_modules/connect/lib/middleware/staticCache.js
  104. +44 −0 node_modules/express/node_modules/connect/lib/middleware/vhost.js
  105. +79 −0 node_modules/express/node_modules/connect/lib/patch.js
  106. +75 −0 node_modules/express/node_modules/connect/lib/public/directory.html
  107. +13 −0 node_modules/express/node_modules/connect/lib/public/error.html
  108. BIN  node_modules/express/node_modules/connect/lib/public/favicon.ico
  109. BIN  node_modules/express/node_modules/connect/lib/public/icons/page.png
  110. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_add.png
  111. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_attach.png
  112. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_code.png
  113. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_copy.png
  114. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_delete.png
  115. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_edit.png
  116. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_error.png
  117. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_excel.png
  118. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_find.png
  119. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_gear.png
  120. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_go.png
  121. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_green.png
  122. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_key.png
  123. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png
  124. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_link.png
  125. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png
  126. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paste.png
  127. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_red.png
  128. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png
  129. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_save.png
  130. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white.png
  131. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png
  132. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png
  133. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png
  134. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png
  135. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png
  136. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png
  137. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png
  138. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png
  139. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png
  140. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png
  141. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png
  142. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png
  143. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png
  144. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png
  145. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png
  146. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png
  147. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png
  148. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png
  149. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png
  150. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png
  151. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png
  152. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png
  153. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png
  154. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png
  155. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png
  156. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png
  157. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png
  158. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png
  159. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png
  160. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png
  161. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png
  162. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png
  163. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png
  164. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png
  165. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png
  166. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png
  167. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png
  168. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png
  169. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png
  170. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png
  171. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png
  172. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png
  173. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png
  174. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png
  175. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png
  176. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png
  177. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png
  178. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png
  179. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png
  180. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png
  181. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png
  182. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png
  183. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png
  184. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png
  185. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png
  186. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_word.png
  187. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_world.png
  188. +141 −0 node_modules/express/node_modules/connect/lib/public/style.css
  189. +451 −0 node_modules/express/node_modules/connect/lib/utils.js
  190. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/.gitignore
  191. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/.npmignore
  192. +4 −0 node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml
  193. +14 −0 node_modules/express/node_modules/connect/node_modules/formidable/Makefile
  194. +286 −0 node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
  195. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/TODO
  196. +70 −0 node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js
  197. +43 −0 node_modules/express/node_modules/connect/node_modules/formidable/example/post.js
  198. +48 −0 node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js
  199. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/index.js
  200. +61 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
  201. +377 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
  202. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js
  203. +312 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js
  204. +25 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js
  205. +6 −0 node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js
  206. +22 −0 node_modules/express/node_modules/connect/node_modules/formidable/package.json
  207. +19 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/common.js
  208. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt
  209. +1 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt
  210. +13 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/generic.http
  211. +3 −0  ...es/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md
  212. +26 −0 ...node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http
  213. +24 −0 ...de_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http
  214. +23 −0 .../node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http
  215. +24 −0 .../node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http
  216. +22 −0 ...press/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http
  217. +22 −0 ...press/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http
  218. +22 −0 ...s/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http
  219. +3 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js
  220. +21 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js
  221. +72 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js
  222. +89 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js
  223. +24 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js
  224. +80 −0 ...dules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js
  225. +104 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js
  226. +715 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
  227. +50 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js
  228. +45 −0 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js
  229. +72 −0 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
  230. +2 −0  node_modules/express/node_modules/connect/node_modules/formidable/test/run.js
  231. +63 −0 node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
  232. +47 −0 node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js
  233. +25 −0 node_modules/express/node_modules/connect/package.json
  234. +19 −0 node_modules/express/node_modules/mime/LICENSE
  235. +50 −0 node_modules/express/node_modules/mime/README.md
  236. +92 −0 node_modules/express/node_modules/mime/mime.js
  237. +22 −0 node_modules/express/node_modules/mime/package.json
  238. +79 −0 node_modules/express/node_modules/mime/test.js
  239. +1,479 −0 node_modules/express/node_modules/mime/types/mime.types
  240. +43 −0 node_modules/express/node_modules/mime/types/node.types
  241. +2 −0  node_modules/express/node_modules/mkdirp/.gitignore
  242. +2 −0  node_modules/express/node_modules/mkdirp/.gitignore.orig
  243. +5 −0 node_modules/express/node_modules/mkdirp/.gitignore.rej
  244. +21 −0 node_modules/express/node_modules/mkdirp/LICENSE
  245. +21 −0 node_modules/express/node_modules/mkdirp/README.markdown
  246. +6 −0 node_modules/express/node_modules/mkdirp/examples/pow.js
  247. +6 −0 node_modules/express/node_modules/mkdirp/examples/pow.js.orig
  248. +19 −0 node_modules/express/node_modules/mkdirp/examples/pow.js.rej
  249. +20 −0 node_modules/express/node_modules/mkdirp/index.js
  250. +23 −0 node_modules/express/node_modules/mkdirp/package.json
  251. +28 −0 node_modules/express/node_modules/mkdirp/test/mkdirp.js
  252. +41 −0 node_modules/express/node_modules/mkdirp/test/race.js
  253. +32 −0 node_modules/express/node_modules/mkdirp/test/rel.js
  254. +1 −0  node_modules/express/node_modules/qs/.gitignore
  255. +6 −0 node_modules/express/node_modules/qs/.gitmodules
  256. +63 −0 node_modules/express/node_modules/qs/History.md
  257. +5 −0 node_modules/express/node_modules/qs/Makefile
  258. +47 −0 node_modules/express/node_modules/qs/Readme.md
  259. +17 −0 node_modules/express/node_modules/qs/benchmark.js
  260. +48 −0 node_modules/express/node_modules/qs/examples.js
  261. +2 −0  node_modules/express/node_modules/qs/index.js
  262. +262 −0 node_modules/express/node_modules/qs/lib/querystring.js
  263. +16 −0 node_modules/express/node_modules/qs/package.json
  264. +2 −0  node_modules/express/node_modules/qs/test/mocha.opts
  265. +155 −0 node_modules/express/node_modules/qs/test/parse.js
  266. +95 −0 node_modules/express/node_modules/qs/test/stringify.js
  267. +39 −0 node_modules/express/package.json
  268. +35 −0 node_modules/express/testing/foo/app.js
  269. +9 −0 node_modules/express/testing/foo/package.json
  270. +8 −0 node_modules/express/testing/foo/public/stylesheets/style.css
  271. +10 −0 node_modules/express/testing/foo/routes/index.js
  272. +2 −0  node_modules/express/testing/foo/views/index.jade
  273. +6 −0 node_modules/express/testing/foo/views/layout.jade
  274. +43 −0 node_modules/express/testing/index.js
  275. +2,971 −0 node_modules/express/testing/public/test.txt
  276. +1 −0  node_modules/express/testing/views/page.html
  277. +3 −0  node_modules/express/testing/views/page.jade
  278. +1 −0  node_modules/express/testing/views/test.md
  279. +1 −0  node_modules/express/testing/views/user/index.jade
  280. +1 −0  node_modules/express/testing/views/user/list.jade
  281. +4 −0 node_modules/jade/.gitignore
  282. +21 −0 node_modules/jade/.gitmodules
  283. +4 −0 node_modules/jade/.npmignore
  284. +4 −0 node_modules/jade/.travis.yml
  285. +498 −0 node_modules/jade/History.md
  286. +22 −0 node_modules/jade/LICENSE
  287. +40 −0 node_modules/jade/Makefile
  288. +1,006 −0 node_modules/jade/Readme.md
  289. +125 −0 node_modules/jade/bin/jade
  290. +8 −0 node_modules/jade/examples/attributes.jade
  291. +11 −0 node_modules/jade/examples/attributes.js
  292. +13 −0 node_modules/jade/examples/code.jade
  293. +16 −0 node_modules/jade/examples/code.js
  294. +5 −0 node_modules/jade/examples/csrf.jade
  295. +42 −0 node_modules/jade/examples/csrf.js
  296. +5 −0 node_modules/jade/examples/dynamicscript.jade
  297. +20 −0 node_modules/jade/examples/dynamicscript.js
  298. +3 −0  node_modules/jade/examples/each.jade
  299. +16 −0 node_modules/jade/examples/each.js
  300. +10 −0 node_modules/jade/examples/extend-layout.jade
Sorry, we could not display the entire diff because too many files (1,183) changed.
35 app.js
@@ -0,0 +1,35 @@
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express')
+ , routes = require('./routes')
+
+var app = module.exports = express.createServer();
+
+// Configuration
+
+app.configure(function(){
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'jade');
+ app.use(express.bodyParser());
+ app.use(express.methodOverride());
+ app.use(app.router);
+ app.use(express.static(__dirname + '/public'));
+});
+
+app.configure('development', function(){
+ app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
+});
+
+app.configure('production', function(){
+ app.use(express.errorHandler());
+});
+
+// Routes
+
+app.get('/', routes.index);
+
+app.listen(3000);
+console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
1  node_modules/.bin/express
1  node_modules/.bin/jade
1  node_modules/.bin/mocha
1  node_modules/.bin/mocha-debug
1  node_modules/.bin/stylus
1  node_modules/connect-assets/.gitignore
@@ -0,0 +1 @@
+node_modules
59 node_modules/connect-assets/Cakefile
@@ -0,0 +1,59 @@
+fs = require 'fs'
+{print} = require 'sys'
+{spawn, exec} = require 'child_process'
+watchit = require 'watchit'
+
+build = (watch, callback) ->
+ if typeof watch is 'function'
+ callback = watch
+ watch = false
+ options = ['-c', '-o', 'lib', 'src']
+ options.unshift '-w' if watch
+
+ coffee = spawn 'coffee', options
+ coffee.stdout.on 'data', (data) -> print data.toString()
+ coffee.stderr.on 'data', (data) -> print data.toString()
+ coffee.on 'exit', (status) -> callback?() if status is 0
+
+task 'docs', 'Generate annotated source code with Docco', ->
+ fs.readdir 'src', (err, contents) ->
+ files = ("src/#{file}" for file in contents when /\.coffee$/.test file)
+ docco = spawn 'docco', files
+ docco.stdout.on 'data', (data) -> print data.toString()
+ docco.stderr.on 'data', (data) -> print data.toString()
+ docco.on 'exit', (status) -> callback?() if status is 0
+
+task 'build', 'Compile CoffeeScript source files', ->
+ build()
+
+task 'watch', 'Recompile CoffeeScript source files when modified', ->
+ build true
+
+task 'test', 'Run the test suite (and re-run if anything changes)', ->
+ suite = null
+ build ->
+ do runTests = ->
+ suite?.kill()
+ suiteNames = [
+ 'DevelopmentIntegration'
+ 'ProductionIntegration'
+ 'AbsoluteIntegration'
+ 'RemoteIntegration'
+ 'BenchmarkDynamic'
+ 'BenchmarkStatic'
+ ]
+ suiteIndex = 0
+ do runNextTestSuite = ->
+ return unless suiteName = suiteNames[suiteIndex]
+ suite = spawn "coffee", ["-e", "{reporters} = require 'nodeunit'; reporters.default.run ['#{suiteName}.coffee']"], cwd: 'test'
+ suite.stdout.on 'data', (data) -> print data.toString()
+ suite.stderr.on 'data', (data) -> print data.toString()
+ suite.on 'exit', -> suiteIndex++; runNextTestSuite()
+ invoke 'docs' # lest I forget
+
+ watchTargets = (targets..., callback) ->
+ for target in targets
+ watchit target, include: true, (event) ->
+ callback() unless event is 'success'
+ watchTargets 'src', -> build runTests
+ watchTargets 'test', 'Cakefile', runTests
109 node_modules/connect-assets/README.mdown
@@ -0,0 +1,109 @@
+# connect-assets
+
+Transparent file compilation and dependency management for Node's [connect](https://github.com/senchalabs/connect) framework in the spirit of the Rails 3.1 asset pipeline.
+
+Written in CoffeeScript by the author of [CoffeeScript: Accelerated JavaScript Development](http://pragprog.com/book/tbcoffee/coffeescript).
+
+## What?
+
+connect-assets can:
+
+1. Serve `.coffee` ([CoffeeScript](http://coffeescript.org)) files as compiled `.js`
+1. Concatenate `.coffee` and `.js` together using [Snockets](https://github.com/TrevorBurnham/snockets)
+1. Serve `.styl` ([Stylus](http://learnboost.github.com/stylus/)) as compiled `.css` (with [nib](https://github.com/visionmedia/nib) baked in when available)
+1. Serve files with an MD5 hash suffix and use a far-future expires header for maximum efficiency
+1. Avoid redundant git diffs by storing compiled `.js` and `.css` files in memory rather than writing them to the disk—except when you want them (e.g. for deployment to a CDN).
+
+## How?
+
+First, install it in your project's directory:
+
+ npm install connect-assets
+
+Also install any specific compilers you'll need, e.g.:
+
+ npm install coffee-script
+ npm install stylus
+ npm install nib
+
+Then add this line to your app's configuration:
+
+ app.use require('connect-assets')()
+
+Finally, create an `assets` directory in your project and throw all your `.coffee` and `.styl` files in there
+
+### Markup functions
+
+connect-assets provides two global functions named `js` and `css`. Use them in your views. They tell connect-assets to do any necessary compilation, then return the markup you need. For instance, in a [Jade template](http://jade-lang.com/), the code
+
+ != css('normalize')
+ != js('jquery')
+
+(where `!= is Jade's syntax for running JS and displaying its output) results in the markup
+
+ <link rel='stylesheet' href='/css/normalize.css'>
+ <script src='/js/jquery.js'></script>
+
+### Sprockets-style concatenation
+
+You can indicate dependencies in your CoffeeScript files using the Sprockets-style syntax
+
+ #= require dependency
+
+(or `//= require dependency` in JavaScript). When you do so, and point the `js` function at that file, two things can happen:
+
+1. By default, you'll get multiple `<script>` tags out, in an order that gives you all of your dependencies.
+2. If you passed the `build: true` option to connect-assets (enabled by default when `process.env.NODE_ENV == 'production'`), you'll just get a single tag, wich will point to a JavaScript file that encompasses the target's entire dependency graph—compiled, concatenated, and minified (with [UglifyJS](https://github.com/mishoo/UglifyJS)).
+
+If you want to bring in a whole folder of scripts, use
+
+ #= require_tree dir
+
+See [Snockets](http://github.com/TrevorBurnham/snockets) for more information.
+
+**Note:** CSS concatenation is not supported by connect-assets directly, because Stylus already does a fine job of this. Stylus is basically a superset of CSS, so just rename your `.css` files to `.styl` and learn about its [@import](http://learnboost.github.com/stylus/docs/import.html) syntax.
+
+## Options
+
+If you like, you can pass any of these options to the function returned by `require('connect-assets')`:
+
+* `src` (defaults to `'assets'`): The directory assets will be read from
+* `helperContext` (defaults to `global`): The object the `css` and `js` helper functions will attach to
+* ... see the source (`src/assets.coffee`) for more.
+
+You can also set the "root path" on the `css` and `js` helper functions (by default, `/css` and `/js`), e.g.
+
+ css.root = '/stylesheets'
+ js.root = '/javascripts'
+
+To override these roots, start a path with `'/'`. So, for instance,
+
+ css('style.css')
+
+generates
+
+ <link rel='stylesheet' href='/css/normalize.css'>
+
+while
+
+ css('/style.css')
+
+gives you
+
+ <link rel='stylesheet' href='/normalize.css'>
+
+## Credits
+
+Borrows heavily from Connect's [compiler](https://github.com/senchalabs/connect/blob/1.6.4/lib/middleware/compiler.js) and [static](https://github.com/senchalabs/connect/blob/1.6.4/lib/middleware/static.js) middlewares, and of course sstephenson's [Sprockets](https://github.com/sstephenson/sprockets).
+
+Contributors: [hasenj](https://github.com/hasenj), [TrevorBurnham](https://github.com/TrevorBurnham/).
+
+## License
+
+©2011 Trevor Burnham and available under the [MIT license](http://www.opensource.org/licenses/mit-license.php):
+
+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.
21 node_modules/connect-assets/docs/DependencyGraph.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html> <html> <head> <title>DependencyGraph.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="DependencyGraph.html"> DependencyGraph.coffee </a> <a class="source" href="Middleware.html"> Middleware.coffee </a> <a class="source" href="assets.html"> assets.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> DependencyGraph.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <p><a href="http://github.com/TrevorBurnham/connect-assets">connect-assets</a></p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">module.exports = </span><span class="k">class</span> <span class="nx">DependencyGraph</span>
+ <span class="nv">constructor: </span><span class="o">-&gt;</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>The internal representation of the dependency graph in the format
+<code>id: [ids]</code>, indicating only <em>direct</em> dependencies.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@map = </span><span class="p">{}</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>Add a direct dependency. Returns <code>false</code> if that dependency is a duplicate.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">add: </span><span class="nf">(id, depId) -&gt;</span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span> <span class="o">?=</span> <span class="p">[]</span>
+ <span class="k">return</span> <span class="kc">false</span> <span class="k">if</span> <span class="nx">depId</span> <span class="k">in</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">].</span><span class="nx">push</span> <span class="nx">depId</span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Generate a list of all dependencies (direct and indirect) for the given id,
+in logical order with no duplicates.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">getChain: </span><span class="nf">(id, traversedPaths = [], traversedBranch = []) -&gt;</span>
+ <span class="k">return</span> <span class="p">[]</span> <span class="nx">unless</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span>
+
+ <span class="k">for</span> <span class="nx">depId</span> <span class="k">in</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">].</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="nx">reverse</span><span class="p">()</span>
+ <span class="k">if</span> <span class="nx">depId</span> <span class="k">in</span> <span class="nx">traversedBranch</span> <span class="c1"># cycle</span>
+ <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s2">&quot;Cyclic dependency from #{id} to #{depId}&quot;</span><span class="p">)</span>
+ <span class="k">continue</span> <span class="k">if</span> <span class="nx">depId</span> <span class="k">in</span> <span class="nx">traversedPaths</span> <span class="c1"># duplicate</span>
+ <span class="nx">traversedPaths</span><span class="p">.</span><span class="nx">unshift</span> <span class="nx">depId</span>
+ <span class="nx">traversedBranch</span><span class="p">.</span><span class="nx">unshift</span> <span class="nx">depId</span>
+ <span class="nx">@getChain</span> <span class="nx">depId</span><span class="p">,</span> <span class="nx">traversedPaths</span><span class="p">,</span> <span class="nx">traversedBranch</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+
+ <span class="nx">traversedPaths</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
45 node_modules/connect-assets/docs/Middleware.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html> <html> <head> <title>Middleware.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="DependencyGraph.html"> DependencyGraph.coffee </a> <a class="source" href="Middleware.html"> Middleware.coffee </a> <a class="source" href="assets.html"> assets.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> Middleware.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">module.exports = </span><span class="k">class</span> <span class="nx">Middleware</span>
+ <span class="nv">constructor: </span><span class="nf">(@options, @compilers, @cache) -&gt;</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Handles incoming requests.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">intercept: </span><span class="nf">(req, res, next) -&gt;</span>
+ <span class="k">return</span> <span class="nx">next</span><span class="p">()</span> <span class="nx">unless</span> <span class="nx">req</span><span class="p">.</span><span class="nx">method</span> <span class="o">is</span> <span class="s1">&#39;GET&#39;</span>
+ <span class="nv">targetPath = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">src</span><span class="p">,</span> <span class="nx">parse</span><span class="p">(</span><span class="nx">req</span><span class="p">.</span><span class="nx">url</span><span class="p">).</span><span class="nx">pathname</span>
+ <span class="k">return</span> <span class="nx">next</span><span class="p">()</span> <span class="k">if</span> <span class="nx">targetPath</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span> <span class="o">is</span> <span class="s1">&#39;/&#39;</span> <span class="c1"># ignore directory requests</span>
+ <span class="nv">cachedTarget = </span><span class="nx">@cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">]</span>
+ <span class="k">if</span> <span class="nx">cachedTarget</span> <span class="o">and</span> <span class="p">(</span><span class="o">!</span><span class="nx">cachedTarget</span><span class="p">.</span><span class="nx">mtime</span><span class="p">)</span> <span class="c1"># memory content</span>
+ <span class="p">{</span><span class="nx">static</span><span class="p">,</span> <span class="nx">str</span><span class="p">}</span> <span class="o">=</span> <span class="nx">cachedTarget</span>
+ <span class="k">return</span> <span class="nx">sendFile</span><span class="p">(</span><span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">static</span><span class="p">,</span> <span class="nx">str</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">})</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">stat</span> <span class="nx">targetPath</span><span class="p">,</span> <span class="nf">(err, stats) -&gt;</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>if the file exists, serve it</p> </td> <td class="code"> <div class="highlight"><pre> <span class="k">return</span> <span class="nx">serveRaw</span> <span class="nx">req</span><span class="p">,</span> <span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">}</span> <span class="nx">unless</span> <span class="nx">err</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>if the file doesn't exist, see if it can be compiled</p> </td> <td class="code"> <div class="highlight"><pre> <span class="k">for</span> <span class="nx">ext</span><span class="p">,</span> <span class="nx">compiler</span> <span class="k">of</span> <span class="nx">compilers</span>
+ <span class="k">if</span> <span class="nx">compiler</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">test</span> <span class="nx">targetPath</span>
+ <span class="k">return</span> <span class="nx">serveCompiled</span> <span class="nx">req</span><span class="p">,</span> <span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">compiler</span><span class="p">,</span> <span class="nx">ext</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">}</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <p>otherwise, pass the request up the Connect stack</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">next</span><span class="p">()</span>
+
+ <span class="nv">serveRaw = </span><span class="nf">(req, res, next, {stats, targetPath}) -&gt;</span>
+ <span class="k">if</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">mtime</span>
+ <span class="nx">unless</span> <span class="nx">stats</span><span class="p">.</span><span class="nx">mtime</span> <span class="o">&gt;</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">].</span><span class="nx">mtime</span>
+ <span class="nv">str = </span><span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">].</span><span class="nx">str</span>
+ <span class="k">return</span> <span class="nx">sendFile</span> <span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">str</span><span class="p">,</span> <span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">}</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">readFile</span> <span class="nx">targetPath</span><span class="p">,</span> <span class="s1">&#39;utf8&#39;</span><span class="p">,</span> <span class="nx">sendCallback</span><span class="p">(</span><span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">})</span>
+
+ <span class="nv">serveCompiled = </span><span class="nf">(req, res, next, {compiler, ext, targetPath}) -&gt;</span>
+ <span class="nv">srcPath = </span><span class="nx">targetPath</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="nx">compiler</span><span class="p">.</span><span class="nx">match</span><span class="p">,</span> <span class="s2">&quot;.#{ext}&quot;</span><span class="p">)</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">stat</span> <span class="nx">srcPath</span><span class="p">,</span> <span class="nf">(err, stats) -&gt;</span>
+ <span class="k">return</span> <span class="nx">next</span><span class="p">()</span> <span class="k">if</span> <span class="nx">err</span><span class="o">?</span><span class="p">.</span><span class="nx">code</span> <span class="o">is</span> <span class="s1">&#39;ENOENT&#39;</span> <span class="c1"># no file, no problem!</span>
+ <span class="k">return</span> <span class="nx">next</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span>
+ <span class="k">if</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">mtime</span>
+ <span class="nx">unless</span> <span class="nx">stats</span><span class="p">.</span><span class="nx">mtime</span> <span class="o">&gt;</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">].</span><span class="nx">mtime</span>
+ <span class="k">if</span> <span class="nx">compiler</span> <span class="o">is</span> <span class="nx">compilers</span><span class="p">.</span><span class="nx">styl</span> <span class="c1"># @import-ed files may have changed</span>
+ <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">].</span><span class="nv">str = </span><span class="nx">compiler</span><span class="p">.</span><span class="nx">compileStr</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">srcPath</span><span class="p">].</span><span class="nx">str</span><span class="p">,</span> <span class="nx">srcPath</span>
+ <span class="nv">str = </span><span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">].</span><span class="nx">str</span>
+ <span class="k">return</span> <span class="nx">sendFile</span> <span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">str</span><span class="p">,</span> <span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">}</span>
+ <span class="nx">compiler</span><span class="p">.</span><span class="nx">compile</span> <span class="nx">srcPath</span><span class="p">,</span> <span class="nx">sendCallback</span><span class="p">(</span><span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">})</span>
+
+ <span class="nv">sendCallback = </span><span class="nf">(res, next, {static, stats, targetPath}) -&gt;</span>
+ <span class="nf">(err, str) -&gt;</span>
+ <span class="k">return</span> <span class="nx">next</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span>
+ <span class="nx">sendFile</span> <span class="nx">res</span><span class="p">,</span> <span class="nx">next</span><span class="p">,</span> <span class="p">{</span><span class="nx">str</span><span class="p">,</span> <span class="nx">static</span><span class="p">,</span> <span class="nx">stats</span><span class="p">,</span> <span class="nx">targetPath</span><span class="p">}</span>
+
+ <span class="nv">sendFile = </span><span class="nf">(res, next, {str, static, stats, targetPath}) -&gt;</span>
+ <span class="k">if</span> <span class="nx">stats</span> <span class="k">then</span> <span class="nx">cache</span><span class="p">[</span><span class="nx">targetPath</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="nv">mtime: </span><span class="nx">stats</span><span class="p">.</span><span class="nx">mtime</span><span class="p">,</span> <span class="nx">str</span><span class="p">}</span>
+ <span class="nx">res</span><span class="p">.</span><span class="nx">setHeader</span> <span class="s1">&#39;Content-Type&#39;</span><span class="p">,</span> <span class="nx">mime</span><span class="p">.</span><span class="nx">lookup</span><span class="p">(</span><span class="nx">targetPath</span><span class="p">)</span>
+ <span class="nx">res</span><span class="p">.</span><span class="nx">setHeader</span> <span class="s1">&#39;Expires&#39;</span><span class="p">,</span> <span class="nx">module</span><span class="p">.</span><span class="nx">exports</span><span class="p">.</span><span class="nx">FAR_FUTURE_EXPIRES</span> <span class="k">if</span> <span class="nx">static</span>
+ <span class="nx">res</span><span class="p">.</span><span class="nx">end</span> <span class="nx">str</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">&#182;</a> </div> <p>constants</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">FAR_FUTURE_EXPIRES = </span><span class="s2">&quot;Wed, 01 Feb 2034 12:34:56 GMT&quot;</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
202 node_modules/connect-assets/docs/assets.html
@@ -0,0 +1,202 @@
+<!DOCTYPE html> <html> <head> <title>assets.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> assets.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <p><a href="http://github.com/TrevorBurnham/connect-assets">connect-assets</a></p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">connectCache = </span><span class="nx">require</span> <span class="s1">&#39;connect-file-cache&#39;</span>
+<span class="nv">Snockets = </span><span class="nx">require</span> <span class="s1">&#39;snockets&#39;</span>
+
+<span class="nv">crypto = </span><span class="nx">require</span> <span class="s1">&#39;crypto&#39;</span>
+<span class="nv">fs = </span><span class="nx">require</span> <span class="s1">&#39;fs&#39;</span>
+<span class="nv">path = </span><span class="nx">require</span> <span class="s1">&#39;path&#39;</span>
+<span class="nv">_ = </span><span class="nx">require</span> <span class="s1">&#39;underscore&#39;</span>
+<span class="p">{</span><span class="nx">parse</span><span class="p">}</span> <span class="o">=</span> <span class="nx">require</span> <span class="s1">&#39;url&#39;</span>
+
+<span class="nv">libs = </span><span class="p">{}</span>
+
+<span class="nv">module.exports = </span><span class="nf">(options = {}) -&gt;</span>
+ <span class="k">return</span> <span class="nx">connectAssets</span> <span class="k">if</span> <span class="nx">connectAssets</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">src</span> <span class="o">?=</span> <span class="s1">&#39;assets&#39;</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">helperContext</span> <span class="o">?=</span> <span class="nx">global</span>
+ <span class="k">if</span> <span class="nx">process</span><span class="p">.</span><span class="nx">env</span><span class="p">.</span><span class="nx">NODE_ENV</span> <span class="o">is</span> <span class="s1">&#39;production&#39;</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">build</span> <span class="o">?=</span> <span class="kc">true</span>
+ <span class="nx">cssCompilers</span><span class="p">.</span><span class="nx">styl</span><span class="p">.</span><span class="nx">compress</span> <span class="o">?=</span> <span class="kc">true</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">buildDir</span> <span class="o">?=</span> <span class="s1">&#39;builtAssets&#39;</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">buildFilenamer</span> <span class="o">?=</span> <span class="nx">md5Filenamer</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">buildsExpire</span> <span class="o">?=</span> <span class="kc">false</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">detectChanges</span> <span class="o">?=</span> <span class="kc">true</span>
+ <span class="nx">options</span><span class="p">.</span><span class="nx">minifyBuilds</span> <span class="o">?=</span> <span class="kc">true</span>
+
+ <span class="nv">connectAssets = module.exports.instance = </span><span class="k">new</span> <span class="nx">ConnectAssets</span> <span class="nx">options</span>
+ <span class="nx">connectAssets</span><span class="p">.</span><span class="nx">createHelpers</span> <span class="nx">options</span>
+ <span class="nx">connectAssets</span><span class="p">.</span><span class="nx">cache</span><span class="p">.</span><span class="nx">middleware</span>
+
+<span class="k">class</span> <span class="nx">ConnectAssets</span>
+ <span class="nv">constructor: </span><span class="nf">(@options) -&gt;</span>
+ <span class="vi">@cache = </span><span class="nx">connectCache</span><span class="p">()</span>
+ <span class="vi">@snockets = </span><span class="k">new</span> <span class="nx">Snockets</span> <span class="nv">src: </span><span class="nx">@options</span><span class="p">.</span><span class="nx">src</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Things that we must cache to work efficiently with CSS compilers</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@cssSourceFiles = </span><span class="p">{}</span>
+ <span class="vi">@compiledCss = </span><span class="p">{}</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>Things that we must cache to efficiently use MD5 suffixes</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@buildFilenames = </span><span class="p">{}</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Things that we must cache if changes aren't detected</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@cachedRoutePaths = </span><span class="p">{}</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <h2>CSS and JS tag functions</h2> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">createHelpers: </span><span class="o">-&gt;</span>
+ <span class="nv">context = </span><span class="nx">@options</span><span class="p">.</span><span class="nx">helperContext</span>
+ <span class="nv">srcIsRemote = </span><span class="nx">@options</span><span class="p">.</span><span class="nx">src</span><span class="p">.</span><span class="nx">match</span> <span class="nx">REMOTE_PATH</span>
+ <span class="nv">expandRoute = </span><span class="nf">(shortRoute, ext, rootDir) -&gt;</span>
+ <span class="nv">context.js.root = </span><span class="nx">context</span><span class="p">.</span><span class="nx">js</span><span class="p">.</span><span class="nx">root</span><span class="p">[</span><span class="mi">1</span><span class="p">..]</span> <span class="k">if</span> <span class="nx">context</span><span class="p">.</span><span class="nx">js</span><span class="p">.</span><span class="nx">root</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">is</span> <span class="s1">&#39;/&#39;</span>
+ <span class="k">if</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">match</span> <span class="nx">EXPLICIT_PATH</span>
+ <span class="nx">unless</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">match</span> <span class="nx">REMOTE_PATH</span>
+ <span class="k">if</span> <span class="nx">shortRoute</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">is</span> <span class="s1">&#39;/&#39;</span> <span class="k">then</span> <span class="nv">shortRoute = </span><span class="nx">shortRoute</span><span class="p">[</span><span class="mi">1</span><span class="p">..]</span>
+ <span class="k">else</span>
+ <span class="nv">shortRoute = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">rootDir</span><span class="p">,</span> <span class="nx">shortRoute</span>
+ <span class="k">if</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">ext</span><span class="p">,</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="nx">ext</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span> <span class="o">is</span> <span class="o">-</span><span class="mi">1</span>
+ <span class="nx">shortRoute</span> <span class="o">+=</span> <span class="nx">ext</span>
+ <span class="nx">shortRoute</span>
+
+ <span class="nv">context.css = </span><span class="p">(</span><span class="nx">route</span><span class="p">)</span> <span class="o">=&gt;</span>
+ <span class="nv">route = </span><span class="nx">expandRoute</span> <span class="nx">route</span><span class="p">,</span> <span class="s1">&#39;.css&#39;</span><span class="p">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">css</span><span class="p">.</span><span class="nx">root</span>
+ <span class="nx">unless</span> <span class="nx">route</span><span class="p">.</span><span class="nx">match</span> <span class="nx">REMOTE_PATH</span>
+ <span class="nv">route = </span><span class="nx">@compileCSS</span> <span class="nx">route</span>
+ <span class="s2">&quot;&lt;link rel=&#39;stylesheet&#39; href=&#39;#{route}&#39;&gt;&quot;</span>
+ <span class="nv">context.css.root = </span><span class="s1">&#39;css&#39;</span>
+
+ <span class="nv">context.js = </span><span class="p">(</span><span class="nx">route</span><span class="p">)</span> <span class="o">=&gt;</span>
+ <span class="nv">route = </span><span class="nx">expandRoute</span> <span class="nx">route</span><span class="p">,</span> <span class="s1">&#39;.js&#39;</span><span class="p">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">js</span><span class="p">.</span><span class="nx">root</span>
+ <span class="k">if</span> <span class="nx">route</span><span class="p">.</span><span class="nx">match</span> <span class="nx">REMOTE_PATH</span>
+ <span class="nv">routes = </span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+ <span class="k">else</span> <span class="k">if</span> <span class="nx">srcIsRemote</span>
+ <span class="nv">routes = </span><span class="p">[</span><span class="s2">&quot;#{@options.src}/#{route}&quot;</span><span class="p">]</span>
+ <span class="k">else</span>
+ <span class="nv">routes = </span><span class="nx">@compileJS</span> <span class="nx">route</span>
+ <span class="p">(</span><span class="s2">&quot;&lt;script src=&#39;#{r}&#39;&gt;&lt;/script&gt;&quot;</span> <span class="k">for</span> <span class="nx">r</span> <span class="k">in</span> <span class="nx">routes</span><span class="p">).</span><span class="nx">join</span> <span class="s1">&#39;\n&#39;</span>
+ <span class="nv">context.js.root = </span><span class="s1">&#39;js&#39;</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">&#182;</a> </div> <p>Synchronously compile Stylus to CSS (if needed) and return the route</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">compileCSS: </span><span class="nf">(route) -&gt;</span>
+ <span class="k">if</span> <span class="o">!</span><span class="nx">@options</span><span class="p">.</span><span class="nx">detectChanges</span> <span class="o">and</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+
+ <span class="k">for</span> <span class="nx">ext</span> <span class="k">in</span> <span class="p">[</span><span class="s1">&#39;css&#39;</span><span class="p">].</span><span class="nx">concat</span> <span class="p">(</span><span class="nx">ext</span> <span class="k">for</span> <span class="nx">ext</span> <span class="k">of</span> <span class="nx">cssCompilers</span><span class="p">)</span>
+ <span class="nv">sourcePath = </span><span class="nx">stripExt</span><span class="p">(</span><span class="nx">route</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.#{ext}&quot;</span>
+ <span class="k">try</span>
+ <span class="nv">stats = </span><span class="nx">fs</span><span class="p">.</span><span class="nx">statSync</span> <span class="nx">@absPath</span><span class="p">(</span><span class="nx">sourcePath</span><span class="p">)</span>
+ <span class="k">if</span> <span class="nx">ext</span> <span class="o">is</span> <span class="s1">&#39;css&#39;</span>
+ <span class="k">if</span> <span class="nx">timeEq</span> <span class="nx">mtime</span><span class="p">,</span> <span class="nx">@cache</span><span class="p">.</span><span class="nx">map</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">mtime</span>
+ <span class="nv">alreadyCached = </span><span class="kc">true</span>
+ <span class="k">else</span>
+ <span class="p">{</span><span class="nx">mtime</span><span class="p">}</span> <span class="o">=</span> <span class="nx">stats</span>
+ <span class="nv">css = </span><span class="nx">fs</span><span class="p">.</span><span class="nx">readFileSync</span> <span class="nx">@absPath</span><span class="p">(</span><span class="nx">sourcePath</span><span class="p">)</span>
+ <span class="k">else</span>
+ <span class="k">if</span> <span class="nx">timeEq</span> <span class="nx">stats</span><span class="p">.</span><span class="nx">mtime</span><span class="p">,</span> <span class="nx">@cssSourceFiles</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">mtime</span>
+ <span class="nv">source = </span><span class="nx">@cssSourceFiles</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">].</span><span class="nx">data</span><span class="p">.</span><span class="nx">toString</span> <span class="s1">&#39;utf8&#39;</span>
+ <span class="k">else</span>
+ <span class="nv">data = </span><span class="nx">fs</span><span class="p">.</span><span class="nx">readFileSync</span> <span class="nx">@absPath</span><span class="p">(</span><span class="nx">sourcePath</span><span class="p">)</span>
+ <span class="nx">@cssSourceFiles</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="nx">data</span><span class="p">,</span> <span class="nv">mtime: </span><span class="nx">stats</span><span class="p">.</span><span class="nx">mtime</span><span class="p">}</span>
+ <span class="nv">source = </span><span class="nx">data</span><span class="p">.</span><span class="nx">toString</span> <span class="s1">&#39;utf8&#39;</span>
+ <span class="nv">startTime = </span><span class="k">new</span> <span class="nb">Date</span>
+ <span class="nv">css = </span><span class="nx">cssCompilers</span><span class="p">[</span><span class="nx">ext</span><span class="p">].</span><span class="nx">compileSync</span> <span class="nx">@absPath</span><span class="p">(</span><span class="nx">sourcePath</span><span class="p">),</span> <span class="nx">source</span>
+ <span class="k">if</span> <span class="nx">css</span> <span class="o">is</span> <span class="nx">@compiledCss</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">data</span><span class="p">.</span><span class="nx">toString</span> <span class="s1">&#39;utf8&#39;</span>
+ <span class="nv">alreadyCached = </span><span class="kc">true</span>
+ <span class="k">else</span>
+ <span class="nv">mtime = </span><span class="k">new</span> <span class="nb">Date</span>
+ <span class="nx">@compiledCss</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="nv">data: </span><span class="k">new</span> <span class="nx">Buffer</span><span class="p">(</span><span class="nx">css</span><span class="p">),</span> <span class="nx">mtime</span><span class="p">}</span>
+
+ <span class="k">if</span> <span class="nx">alreadyCached</span> <span class="o">and</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">build</span>
+ <span class="nv">filename = </span><span class="nx">@buildFilenames</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span>
+ <span class="k">return</span> <span class="s2">&quot;/#{filename}&quot;</span>
+ <span class="k">else</span> <span class="k">if</span> <span class="nx">alreadyCached</span>
+ <span class="k">return</span> <span class="s2">&quot;/#{route}&quot;</span>
+ <span class="k">else</span> <span class="k">if</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">build</span>
+ <span class="nv">filename = </span><span class="nx">@options</span><span class="p">.</span><span class="nx">buildFilenamer</span> <span class="nx">route</span><span class="p">,</span> <span class="nx">css</span>
+ <span class="nx">@buildFilenames</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span> <span class="o">=</span> <span class="nx">filename</span>
+ <span class="nv">cacheFlags = </span><span class="p">{</span><span class="nv">expires: </span><span class="nx">@options</span><span class="p">.</span><span class="nx">buildsExpire</span><span class="p">,</span> <span class="nx">mtime</span><span class="p">}</span>
+ <span class="nx">@cache</span><span class="p">.</span><span class="nx">set</span> <span class="nx">filename</span><span class="p">,</span> <span class="nx">css</span><span class="p">,</span> <span class="nx">cacheFlags</span>
+ <span class="k">if</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">buildDir</span>
+ <span class="nv">buildPath = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">process</span><span class="p">.</span><span class="nx">cwd</span><span class="p">(),</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">buildDir</span><span class="p">,</span> <span class="nx">filename</span>
+ <span class="nx">mkdirRecursive</span> <span class="nx">path</span><span class="p">.</span><span class="nx">dirname</span><span class="p">(</span><span class="nx">buildPath</span><span class="p">),</span> <span class="mi">0755</span><span class="p">,</span> <span class="o">-&gt;</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">writeFile</span> <span class="nx">buildPath</span><span class="p">,</span> <span class="nx">css</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;/#{filename}&quot;</span>
+ <span class="k">else</span>
+ <span class="nx">@cache</span><span class="p">.</span><span class="nx">set</span> <span class="nx">route</span><span class="p">,</span> <span class="nx">css</span><span class="p">,</span> <span class="p">{</span><span class="nx">mtime</span><span class="p">}</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;/#{route}&quot;</span>
+ <span class="k">catch</span> <span class="nx">e</span>
+ <span class="k">if</span> <span class="nx">e</span><span class="p">.</span><span class="nx">code</span> <span class="o">is</span> <span class="s1">&#39;ENOENT&#39;</span> <span class="k">then</span> <span class="k">continue</span> <span class="k">else</span> <span class="k">throw</span> <span class="nx">e</span>
+ <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s2">&quot;No file found for route #{route}&quot;</span><span class="p">)</span></pre></div> </td> </tr> <tr id="section-7"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-7">&#182;</a> </div> <p>Synchronously compile to JS with Snockets (if needed) and return route(s)</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">compileJS: </span><span class="nf">(route) -&gt;</span>
+ <span class="k">if</span> <span class="o">!</span><span class="nx">@options</span><span class="p">.</span><span class="nx">detectChanges</span> <span class="o">and</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+
+ <span class="k">for</span> <span class="nx">ext</span> <span class="k">in</span> <span class="p">[</span><span class="s1">&#39;js&#39;</span><span class="p">].</span><span class="nx">concat</span> <span class="p">(</span><span class="nx">ext</span> <span class="k">for</span> <span class="nx">ext</span> <span class="k">of</span> <span class="nx">jsCompilers</span><span class="p">)</span>
+ <span class="nv">sourcePath = </span><span class="nx">stripExt</span><span class="p">(</span><span class="nx">route</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.#{ext}&quot;</span>
+ <span class="k">try</span>
+ <span class="k">if</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">build</span>
+ <span class="nv">filename = </span><span class="kc">null</span>
+ <span class="nv">callback = </span><span class="p">(</span><span class="nx">err</span><span class="p">,</span> <span class="nx">concatenation</span><span class="p">,</span> <span class="nx">changed</span><span class="p">)</span> <span class="o">=&gt;</span>
+ <span class="k">throw</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span>
+ <span class="k">if</span> <span class="nx">changed</span>
+ <span class="nv">filename = </span><span class="nx">@options</span><span class="p">.</span><span class="nx">buildFilenamer</span> <span class="nx">route</span><span class="p">,</span> <span class="nx">concatenation</span>
+ <span class="nx">@buildFilenames</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span> <span class="o">=</span> <span class="nx">filename</span>
+ <span class="nv">cacheFlags = expires: </span><span class="nx">@options</span><span class="p">.</span><span class="nx">buildsExpire</span>
+ <span class="nx">@cache</span><span class="p">.</span><span class="nx">set</span> <span class="nx">filename</span><span class="p">,</span> <span class="nx">concatenation</span><span class="p">,</span> <span class="nx">cacheFlags</span>
+ <span class="k">if</span> <span class="nv">buildDir = </span><span class="nx">@options</span><span class="p">.</span><span class="nx">buildDir</span>
+ <span class="nv">buildPath = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">process</span><span class="p">.</span><span class="nx">cwd</span><span class="p">(),</span> <span class="nx">buildDir</span><span class="p">,</span> <span class="nx">filename</span>
+ <span class="nx">mkdirRecursive</span> <span class="nx">path</span><span class="p">.</span><span class="nx">dirname</span><span class="p">(</span><span class="nx">buildPath</span><span class="p">),</span> <span class="mi">0755</span><span class="p">,</span> <span class="nf">(err) -&gt;</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">writeFile</span> <span class="nx">buildPath</span><span class="p">,</span> <span class="nx">concatenation</span>
+ <span class="k">else</span>
+ <span class="nv">filename = </span><span class="nx">@buildFilenames</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span>
+ <span class="nv">snocketsFlags = minify: </span><span class="nx">@options</span><span class="p">.</span><span class="nx">minifyBuilds</span><span class="p">,</span> <span class="nv">async: </span><span class="kc">false</span>
+ <span class="nx">@snockets</span><span class="p">.</span><span class="nx">getConcatenation</span> <span class="nx">sourcePath</span><span class="p">,</span> <span class="nx">snocketsFlags</span><span class="p">,</span> <span class="nx">callback</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;/#{filename}&quot;</span><span class="p">]</span>
+ <span class="k">else</span>
+ <span class="nv">chain = </span><span class="nx">@snockets</span><span class="p">.</span><span class="nx">getCompiledChain</span> <span class="nx">sourcePath</span><span class="p">,</span> <span class="nv">async: </span><span class="kc">false</span>
+ <span class="k">return</span> <span class="nx">@cachedRoutePaths</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span> <span class="o">=</span> <span class="k">for</span> <span class="p">{</span><span class="nx">filename</span><span class="p">,</span> <span class="nx">js</span><span class="p">}</span> <span class="k">in</span> <span class="nx">chain</span>
+ <span class="nv">filename = </span><span class="nx">stripExt</span><span class="p">(</span><span class="nx">filename</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;.js&#39;</span>
+ <span class="nx">@cache</span><span class="p">.</span><span class="nx">set</span> <span class="nx">filename</span><span class="p">,</span> <span class="nx">js</span>
+ <span class="s2">&quot;/#{filename}&quot;</span>
+ <span class="k">catch</span> <span class="nx">e</span>
+ <span class="k">if</span> <span class="nx">e</span><span class="p">.</span><span class="nx">code</span> <span class="o">is</span> <span class="s1">&#39;ENOENT&#39;</span> <span class="k">then</span> <span class="k">continue</span> <span class="k">else</span> <span class="k">throw</span> <span class="nx">e</span>
+ <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s2">&quot;No file found for route #{route}&quot;</span><span class="p">)</span>
+
+ <span class="nv">absPath: </span><span class="nf">(route) -&gt;</span>
+ <span class="k">if</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">src</span><span class="p">.</span><span class="nx">match</span> <span class="nx">EXPLICIT_PATH</span>
+ <span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">src</span><span class="p">,</span> <span class="nx">route</span>
+ <span class="k">else</span>
+ <span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">process</span><span class="p">.</span><span class="nx">cwd</span><span class="p">(),</span> <span class="nx">@options</span><span class="p">.</span><span class="nx">src</span><span class="p">,</span> <span class="nx">route</span></pre></div> </td> </tr> <tr id="section-8"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-8">&#182;</a> </div> <h2>Asset compilers</h2> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.cssCompilers = cssCompilers =</span>
+
+ <span class="nv">styl:</span>
+ <span class="nv">optionsMap: </span><span class="p">{}</span>
+ <span class="nv">compileSync: </span><span class="nf">(sourcePath, source) -&gt;</span>
+ <span class="nv">result = </span><span class="s1">&#39;&#39;</span>
+ <span class="nv">callback = </span><span class="nf">(err, js) -&gt;</span>
+ <span class="k">throw</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span>
+ <span class="nv">result = </span><span class="nx">js</span>
+
+ <span class="nx">libs</span><span class="p">.</span><span class="nx">stylus</span> <span class="o">or=</span> <span class="nx">require</span> <span class="s1">&#39;stylus&#39;</span>
+ <span class="nx">libs</span><span class="p">.</span><span class="nx">nib</span> <span class="o">or=</span> <span class="k">try</span> <span class="nx">require</span> <span class="s1">&#39;nib&#39;</span> <span class="k">catch</span> <span class="nx">e</span> <span class="k">then</span> <span class="p">(</span><span class="o">-&gt;</span> <span class="o">-&gt;</span><span class="p">)</span>
+ <span class="nv">options = </span><span class="nx">@optionsMap</span><span class="p">[</span><span class="nx">sourcePath</span><span class="p">]</span> <span class="o">?=</span>
+ <span class="nv">filename: </span><span class="nx">sourcePath</span>
+ <span class="nv">compress: </span><span class="nx">@compress</span>
+ <span class="nx">libs</span><span class="p">.</span><span class="nx">stylus</span><span class="p">(</span><span class="nx">source</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
+ <span class="p">.</span><span class="nx">use</span><span class="p">(</span><span class="nx">libs</span><span class="p">.</span><span class="nx">nib</span><span class="p">())</span>
+ <span class="p">.</span><span class="nx">render</span> <span class="nx">callback</span>
+ <span class="nx">result</span>
+
+<span class="nv">exports.jsCompilers = jsCompilers = </span><span class="nx">Snockets</span><span class="p">.</span><span class="nx">compilers</span></pre></div> </td> </tr> <tr id="section-9"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-9">&#182;</a> </div> <h2>Regexes</h2> </td> <td class="code"> <div class="highlight"><pre><span class="nv">BEFORE_DOT = </span><span class="sr">/([^.]*)(\..*)?$/</span>
+
+<span class="nv">EXPLICIT_PATH = </span><span class="sr">/^\/|\/\//</span>
+
+<span class="nv">REMOTE_PATH = </span><span class="sr">/\/\//</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">&#182;</a> </div> <h2>Utility functions</h2> </td> <td class="code"> <div class="highlight"><pre><span class="nv">stripExt = </span><span class="nf">(filePath) -&gt;</span>
+ <span class="k">if</span> <span class="p">(</span><span class="nv">lastDotIndex = </span><span class="nx">filePath</span><span class="p">.</span><span class="nx">lastIndexOf</span> <span class="s1">&#39;.&#39;</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">0</span>
+ <span class="nx">filePath</span><span class="p">[</span><span class="mi">0</span><span class="p">...</span><span class="nx">lastDotIndex</span><span class="p">]</span>
+ <span class="k">else</span>
+ <span class="nx">filePath</span>
+
+<span class="nv">cssExts = </span><span class="o">-&gt;</span>
+ <span class="p">(</span><span class="s2">&quot;.#{ext}&quot;</span> <span class="k">for</span> <span class="nx">ext</span> <span class="k">of</span> <span class="nx">cssCompilers</span><span class="p">).</span><span class="nx">concat</span> <span class="s1">&#39;.css&#39;</span>
+
+<span class="nv">timeEq = </span><span class="nf">(date1, date2) -&gt;</span>
+ <span class="nx">date1</span><span class="o">?</span> <span class="o">and</span> <span class="nx">date2</span><span class="o">?</span> <span class="o">and</span> <span class="nx">date1</span><span class="p">.</span><span class="nx">getTime</span><span class="p">()</span> <span class="o">is</span> <span class="nx">date2</span><span class="p">.</span><span class="nx">getTime</span><span class="p">()</span>
+
+<span class="nv">mkdirRecursive = </span><span class="nf">(dir, mode, callback) -&gt;</span>
+ <span class="nv">pathParts = </span><span class="nx">path</span><span class="p">.</span><span class="nx">normalize</span><span class="p">(</span><span class="nx">dir</span><span class="p">).</span><span class="nx">split</span> <span class="s1">&#39;/&#39;</span>
+ <span class="nx">path</span><span class="p">.</span><span class="nx">exists</span> <span class="nx">dir</span><span class="p">,</span> <span class="nf">(exists) -&gt;</span>
+ <span class="k">return</span> <span class="nx">callback</span> <span class="kc">null</span> <span class="k">if</span> <span class="nx">exists</span>
+ <span class="nx">mkdirRecursive</span> <span class="nx">pathParts</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">).</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">),</span> <span class="nx">mode</span><span class="p">,</span> <span class="nf">(err) -&gt;</span>
+ <span class="k">return</span> <span class="nx">callback</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span> <span class="o">and</span> <span class="nx">err</span><span class="p">.</span><span class="nx">errno</span> <span class="o">isnt</span> <span class="nx">process</span><span class="p">.</span><span class="nx">EEXIST</span>
+ <span class="nx">fs</span><span class="p">.</span><span class="nx">mkdir</span> <span class="nx">dir</span><span class="p">,</span> <span class="nx">mode</span><span class="p">,</span> <span class="nx">callback</span>
+
+<span class="nv">exports.md5Filenamer = md5Filenamer = </span><span class="nf">(filename, code) -&gt;</span>
+ <span class="nv">hash = </span><span class="nx">crypto</span><span class="p">.</span><span class="nx">createHash</span><span class="p">(</span><span class="s1">&#39;md5&#39;</span><span class="p">)</span>
+ <span class="nx">hash</span><span class="p">.</span><span class="nx">update</span> <span class="nx">code</span>
+ <span class="nv">md5Hex = </span><span class="nx">hash</span><span class="p">.</span><span class="nx">digest</span> <span class="s1">&#39;hex&#39;</span>
+ <span class="nv">ext = </span><span class="nx">path</span><span class="p">.</span><span class="nx">extname</span> <span class="nx">filename</span>
+ <span class="s2">&quot;#{stripExt filename}-#{md5Hex}#{ext}&quot;</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
39 node_modules/connect-assets/docs/createHelpers.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html> <html> <head> <title>createHelpers.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="assets.html"> assets.coffee </a> <a class="source" href="createHelpers.html"> createHelpers.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> createHelpers.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">path = </span><span class="nx">require</span> <span class="s1">&#39;path&#39;</span>
+
+<span class="nv">module.exports = createHelpers = </span><span class="nf">(options, suffixes) -&gt;</span>
+ <span class="nv">context = </span><span class="nx">options</span><span class="p">.</span><span class="nx">helperContext</span>
+ <span class="nv">expandRoute = </span><span class="nf">(shortRoute, ext, rootDir) -&gt;</span>
+ <span class="nx">unless</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">match</span> <span class="nx">EXPLICIT_PATH</span>
+ <span class="nv">shortRoute = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">rootDir</span><span class="p">,</span> <span class="nx">shortRoute</span>
+ <span class="k">if</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">ext</span><span class="p">,</span> <span class="nx">shortRoute</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="nx">ext</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span> <span class="o">is</span> <span class="o">-</span><span class="mi">1</span>
+ <span class="nx">shortRoute</span> <span class="o">+=</span> <span class="nx">ext</span>
+ <span class="nx">shortRoute</span>
+
+ <span class="nv">cssExt = </span><span class="s1">&#39;.css&#39;</span>
+ <span class="nv">context.css = </span><span class="nf">(route) -&gt;</span>
+ <span class="nv">route = </span><span class="nx">expandRoute</span> <span class="nx">route</span><span class="p">,</span> <span class="nx">cssExt</span><span class="p">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">css</span><span class="p">.</span><span class="nx">root</span>
+ <span class="k">if</span> <span class="nx">suffixes</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+ <span class="nv">route = </span><span class="nx">route</span><span class="p">.</span><span class="nx">replace</span> <span class="sr">/\.css$/</span><span class="p">,</span> <span class="s2">&quot;#{suffixes[route]}.css&quot;</span>
+ <span class="s2">&quot;&lt;link rel=&#39;stylesheet&#39; href=&#39;#{route}&#39;&gt;&quot;</span>
+ <span class="nv">context.css.root = </span><span class="s1">&#39;/css&#39;</span>
+
+ <span class="nv">jsExt = </span><span class="s1">&#39;.js&#39;</span>
+ <span class="nv">context.js = </span><span class="nf">(route) -&gt;</span>
+ <span class="nv">route = </span><span class="nx">expandRoute</span> <span class="nx">route</span><span class="p">,</span> <span class="nx">jsExt</span><span class="p">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">js</span><span class="p">.</span><span class="nx">root</span>
+ <span class="k">if</span> <span class="nx">options</span><span class="p">.</span><span class="nx">src</span><span class="o">?</span> <span class="o">and</span> <span class="o">!</span><span class="nx">route</span><span class="p">.</span><span class="nx">match</span> <span class="nx">REMOTE_PATH</span> <span class="o">and</span> <span class="o">!</span><span class="nx">context</span><span class="p">.</span><span class="nx">js</span><span class="p">.</span><span class="nx">concatenate</span>
+ <span class="nv">dependencyTags = </span><span class="s1">&#39;&#39;</span>
+ <span class="nv">filePath = </span><span class="nx">path</span><span class="p">.</span><span class="nx">join</span> <span class="nx">options</span><span class="p">.</span><span class="nx">src</span><span class="p">,</span> <span class="nx">route</span>
+ <span class="nx">updateDependenciesSync</span> <span class="nx">filePath</span>
+ <span class="k">return</span> <span class="nx">generateTags</span><span class="p">(</span><span class="nx">filePath</span><span class="p">,</span> <span class="nx">options</span><span class="p">).</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39;\n&#39;</span><span class="p">)</span>
+ <span class="k">else</span> <span class="k">if</span> <span class="nx">suffixes</span><span class="p">[</span><span class="nx">route</span><span class="p">]</span>
+ <span class="nv">route = </span><span class="nx">route</span><span class="p">.</span><span class="nx">replace</span> <span class="sr">/\.js$/</span><span class="p">,</span> <span class="s2">&quot;#{suffixes[route]}.js&quot;</span>
+ <span class="s2">&quot;&lt;script src=&#39;#{route}&#39;&gt;&lt;/script&gt;&quot;</span>
+ <span class="nv">context.js.root = </span><span class="s1">&#39;/js&#39;</span>
+ <span class="nv">context.js.concatenate = </span><span class="nx">process</span><span class="p">.</span><span class="nx">env</span><span class="p">.</span><span class="nx">NODE_ENV</span> <span class="o">is</span> <span class="s1">&#39;production&#39;</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Utility functions</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">relPath = </span><span class="nf">(root, fullPath) -&gt;</span>
+ <span class="nx">fullPath</span><span class="p">.</span><span class="nx">slice</span> <span class="nx">root</span><span class="p">.</span><span class="nx">length</span>
+
+<span class="nv">productionJsPath = </span><span class="nf">(filePath, str, options) -&gt;</span>
+ <span class="nv">suffix = </span><span class="nx">options</span><span class="p">.</span><span class="nx">suffixGenerator</span> <span class="nx">filePath</span><span class="p">,</span> <span class="nx">str</span>
+ <span class="nx">filePath</span><span class="p">.</span><span class="nx">replace</span> <span class="sr">/\.js$/</span><span class="p">,</span> <span class="s2">&quot;.complete#{suffix}.js&quot;</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
186 node_modules/connect-assets/docs/docco.css
@@ -0,0 +1,186 @@
+/*--------------------- Layout and Typography ----------------------------*/
+body {
+ font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
+ font-size: 15px;
+ line-height: 22px;
+ color: #252519;
+ margin: 0; padding: 0;
+}
+a {
+ color: #261a3b;
+}
+ a:visited {
+ color: #261a3b;
+ }
+p {
+ margin: 0 0 15px 0;
+}
+h1, h2, h3, h4, h5, h6 {
+ margin: 0px 0 15px 0;
+}
+ h1 {
+ margin-top: 40px;
+ }
+#container {
+ position: relative;
+}
+#background {
+ position: fixed;
+ top: 0; left: 525px; right: 0; bottom: 0;
+ background: #f5f5ff;
+ border-left: 1px solid #e5e5ee;
+ z-index: -1;
+}
+#jump_to, #jump_page {
+ background: white;
+ -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
+ -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
+ font: 10px Arial;
+ text-transform: uppercase;
+ cursor: pointer;
+ text-align: right;
+}
+#jump_to, #jump_wrapper {
+ position: fixed;
+ right: 0; top: 0;
+ padding: 5px 10px;
+}
+ #jump_wrapper {
+ padding: 0;
+ display: none;
+ }
+ #jump_to:hover #jump_wrapper {
+ display: block;
+ }
+ #jump_page {
+ padding: 5px 0 3px;
+ margin: 0 0 25px 25px;
+ }
+ #jump_page .source {
+ display: block;
+ padding: 5px 10px;
+ text-decoration: none;
+ border-top: 1px solid #eee;
+ }
+ #jump_page .source:hover {
+ background: #f5f5ff;
+ }
+ #jump_page .source:first-child {
+ }
+table td {
+ border: 0;
+ outline: 0;
+}
+ td.docs, th.docs {
+ max-width: 450px;
+ min-width: 450px;
+ min-height: 5px;
+ padding: 10px 25px 1px 50px;
+ overflow-x: hidden;
+ vertical-align: top;
+ text-align: left;
+ }
+ .docs pre {
+ margin: 15px 0 15px;
+ padding-left: 15px;
+ }
+ .docs p tt, .docs p code {
+ background: #f8f8ff;
+ border: 1px solid #dedede;
+ font-size: 12px;
+ padding: 0 0.2em;
+ }
+ .pilwrap {
+ position: relative;
+ }
+ .pilcrow {
+ font: 12px Arial;
+ text-decoration: none;
+ color: #454545;
+ position: absolute;
+ top: 3px; left: -20px;
+ padding: 1px 2px;
+ opacity: 0;
+ -webkit-transition: opacity 0.2s linear;
+ }
+ td.docs:hover .pilcrow {
+ opacity: 1;
+ }
+ td.code, th.code {
+ padding: 14px 15px 16px 25px;
+ width: 100%;
+ vertical-align: top;
+ background: #f5f5ff;
+ border-left: 1px solid #e5e5ee;
+ }
+ pre, tt, code {
+ font-size: 12px; line-height: 18px;
+ font-family: Monaco, Consolas, "Lucida Console", monospace;
+ margin: 0; padding: 0;
+ }
+
+
+/*---------------------- Syntax Highlighting -----------------------------*/
+td.linenos { background-color: #f0f0f0; padding-right: 10px; }
+span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
+body .hll { background-color: #ffffcc }
+body .c { color: #408080; font-style: italic } /* Comment */
+body .err { border: 1px solid #FF0000 } /* Error */
+body .k { color: #954121 } /* Keyword */
+body .o { color: #666666 } /* Operator */
+body .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+body .cp { color: #BC7A00 } /* Comment.Preproc */
+body .c1 { color: #408080; font-style: italic } /* Comment.Single */
+body .cs { color: #408080; font-style: italic } /* Comment.Special */
+body .gd { color: #A00000 } /* Generic.Deleted */
+body .ge { font-style: italic } /* Generic.Emph */
+body .gr { color: #FF0000 } /* Generic.Error */
+body .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+body .gi { color: #00A000 } /* Generic.Inserted */
+body .go { color: #808080 } /* Generic.Output */
+body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+body .gs { font-weight: bold } /* Generic.Strong */
+body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+body .gt { color: #0040D0 } /* Generic.Traceback */
+body .kc { color: #954121 } /* Keyword.Constant */
+body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */
+body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */
+body .kp { color: #954121 } /* Keyword.Pseudo */
+body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */
+body .kt { color: #B00040 } /* Keyword.Type */
+body .m { color: #666666 } /* Literal.Number */
+body .s { color: #219161 } /* Literal.String */
+body .na { color: #7D9029 } /* Name.Attribute */
+body .nb { color: #954121 } /* Name.Builtin */
+body .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+body .no { color: #880000 } /* Name.Constant */
+body .nd { color: #AA22FF } /* Name.Decorator */
+body .ni { color: #999999; font-weight: bold } /* Name.Entity */
+body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+body .nf { color: #0000FF } /* Name.Function */
+body .nl { color: #A0A000 } /* Name.Label */
+body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+body .nt { color: #954121; font-weight: bold } /* Name.Tag */
+body .nv { color: #19469D } /* Name.Variable */
+body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+body .w { color: #bbbbbb } /* Text.Whitespace */
+body .mf { color: #666666 } /* Literal.Number.Float */
+body .mh { color: #666666 } /* Literal.Number.Hex */
+body .mi { color: #666666 } /* Literal.Number.Integer */
+body .mo { color: #666666 } /* Literal.Number.Oct */
+body .sb { color: #219161 } /* Literal.String.Backtick */
+body .sc { color: #219161 } /* Literal.String.Char */
+body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */
+body .s2 { color: #219161 } /* Literal.String.Double */
+body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+body .sh { color: #219161 } /* Literal.String.Heredoc */
+body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+body .sx { color: #954121 } /* Literal.String.Other */
+body .sr { color: #BB6688 } /* Literal.String.Regex */
+body .s1 { color: #219161 } /* Literal.String.Single */
+body .ss { color: #19469D } /* Literal.String.Symbol */
+body .bp { color: #954121 } /* Name.Builtin.Pseudo */
+body .vc { color: #19469D } /* Name.Variable.Class */
+body .vg { color: #19469D } /* Name.Variable.Global */
+body .vi { color: #19469D } /* Name.Variable.Instance */
+body .il { color: #666666 } /* Literal.Number.Integer.Long */
18 node_modules/connect-assets/docs/parseDirectives.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html> <html> <head> <title>parseDirectives.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="assets.html"> assets.coffee </a> <a class="source" href="createHelpers.html"> createHelpers.coffee </a> <a class="source" href="parseDirectives.html"> parseDirectives.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> parseDirectives.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">HEADER = </span><span class="err">///</span>
+<span class="p">(</span><span class="o">?:</span>
+ <span class="p">(</span><span class="err">\</span><span class="c1">#\#\# .* \#\#\#\n?) |</span>
+ <span class="p">(</span><span class="err">// .* \n?) |</span>
+ <span class="p">(</span><span class="err">\</span><span class="c1"># .* \n?)</span>
+<span class="p">)</span><span class="o">+</span>
+<span class="err">///</span>
+
+<span class="nv">DIRECTIVE = </span><span class="err">///</span>
+<span class="o">^</span><span class="p">[</span><span class="err">\</span><span class="nx">W</span><span class="p">]</span> <span class="o">*=</span> <span class="err">\</span><span class="nx">s</span><span class="o">*</span> <span class="p">(</span><span class="err">\</span><span class="nx">w</span><span class="o">+</span><span class="p">.</span><span class="o">*?</span><span class="p">)</span> <span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="err">\\</span><span class="o">/</span><span class="p">)</span><span class="o">?</span><span class="nx">$</span>
+<span class="err">///gm</span>
+
+<span class="nv">module.exports = parseDirectives = </span><span class="nf">(code) -&gt;</span>
+ <span class="k">return</span> <span class="p">[]</span> <span class="nx">unless</span> <span class="nv">match = </span><span class="nx">HEADER</span><span class="p">.</span><span class="nx">exec</span><span class="p">(</span><span class="nx">code</span><span class="p">)</span>
+ <span class="nv">header = </span><span class="nx">match</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+ <span class="nx">match</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="k">while</span> <span class="nv">match = </span><span class="nx">DIRECTIVE</span><span class="p">.</span><span class="nx">exec</span> <span class="nx">header</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
363 node_modules/connect-assets/lib/assets.js
@@ -0,0 +1,363 @@
+(function() {
+ var BEFORE_DOT, ConnectAssets, EXPLICIT_PATH, REMOTE_PATH, Snockets, connectCache, crypto, cssCompilers, cssExts, fs, jsCompilers, libs, md5Filenamer, mkdirRecursive, parse, path, stripExt, timeEq, _;
+ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+ connectCache = require('connect-file-cache');
+ Snockets = require('snockets');
+ crypto = require('crypto');
+ fs = require('fs');
+ path = require('path');
+ _ = require('underscore');
+ parse = require('url').parse;
+ libs = {};
+ module.exports = function(options) {
+ var connectAssets, _base, _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ if (options == null) {
+ options = {};
+ }
+ if (connectAssets) {
+ return connectAssets;
+ }
+ if ((_ref = options.src) == null) {
+ options.src = 'assets';
+ }
+ if ((_ref2 = options.helperContext) == null) {
+ options.helperContext = global;
+ }
+ if (process.env.NODE_ENV === 'production') {
+ if ((_ref3 = options.build) == null) {
+ options.build = true;
+ }
+ if ((_ref4 = (_base = cssCompilers.styl).compress) == null) {
+ _base.compress = true;
+ }
+ }
+ if ((_ref5 = options.buildDir) == null) {
+ options.buildDir = 'builtAssets';
+ }
+ if ((_ref6 = options.buildFilenamer) == null) {
+ options.buildFilenamer = md5Filenamer;
+ }
+ if ((_ref7 = options.buildsExpire) == null) {
+ options.buildsExpire = false;
+ }
+ if ((_ref8 = options.detectChanges) == null) {
+ options.detectChanges = true;
+ }
+ if ((_ref9 = options.minifyBuilds) == null) {
+ options.minifyBuilds = true;
+ }
+ connectAssets = module.exports.instance = new ConnectAssets(options);
+ connectAssets.createHelpers(options);
+ return connectAssets.cache.middleware;
+ };
+ ConnectAssets = (function() {
+ function ConnectAssets(options) {
+ this.options = options;
+ this.cache = connectCache();
+ this.snockets = new Snockets({
+ src: this.options.src
+ });
+ this.cssSourceFiles = {};
+ this.compiledCss = {};
+ this.buildFilenames = {};
+ this.cachedRoutePaths = {};
+ }
+ ConnectAssets.prototype.createHelpers = function() {
+ var context, expandRoute, srcIsRemote;
+ context = this.options.helperContext;
+ srcIsRemote = this.options.src.match(REMOTE_PATH);
+ expandRoute = function(shortRoute, ext, rootDir) {
+ if (context.js.root[0] === '/') {
+ context.js.root = context.js.root.slice(1);
+ }
+ if (shortRoute.match(EXPLICIT_PATH)) {
+ if (!shortRoute.match(REMOTE_PATH)) {
+ if (shortRoute[0] === '/') {
+ shortRoute = shortRoute.slice(1);
+ }
+ }
+ } else {
+ shortRoute = path.join(rootDir, shortRoute);
+ }
+ if (shortRoute.indexOf(ext, shortRoute.length - ext.length) === -1) {
+ shortRoute += ext;
+ }
+ return shortRoute;
+ };
+ context.css = __bind(function(route) {
+ route = expandRoute(route, '.css', context.css.root);
+ if (!route.match(REMOTE_PATH)) {
+ route = this.compileCSS(route);
+ }
+ return "<link rel='stylesheet' href='" + route + "'>";
+ }, this);
+ context.css.root = 'css';
+ context.js = __bind(function(route) {
+ var r, routes;
+ route = expandRoute(route, '.js', context.js.root);
+ if (route.match(REMOTE_PATH)) {
+ routes = [route];
+ } else if (srcIsRemote) {
+ routes = ["" + this.options.src + "/" + route];
+ } else {
+ routes = this.compileJS(route);
+ }
+ return ((function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = routes.length; _i < _len; _i++) {
+ r = routes[_i];
+ _results.push("<script src='" + r + "'></script>");
+ }
+ return _results;
+ })()).join('\n');
+ }, this);
+ return context.js.root = 'js';
+ };
+ ConnectAssets.prototype.compileCSS = function(route) {
+ var alreadyCached, buildPath, cacheFlags, css, data, ext, filename, mtime, source, sourcePath, startTime, stats, _i, _len, _ref, _ref2, _ref3, _ref4;
+ if (!this.options.detectChanges && this.cachedRoutePaths[route]) {
+ return this.cachedRoutePaths[route];
+ }
+ _ref = ['css'].concat((function() {
+ var _results;
+ _results = [];
+ for (ext in cssCompilers) {
+ _results.push(ext);
+ }
+ return _results;
+ })());
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ ext = _ref[_i];
+ sourcePath = stripExt(route) + ("." + ext);
+ try {
+ stats = fs.statSync(this.absPath(sourcePath));
+ if (ext === 'css') {
+ if (timeEq(mtime, (_ref2 = this.cache.map[route]) != null ? _ref2.mtime : void 0)) {
+ alreadyCached = true;
+ } else {
+ mtime = stats.mtime;
+ css = fs.readFileSync(this.absPath(sourcePath));
+ }
+ } else {
+ if (timeEq(stats.mtime, (_ref3 = this.cssSourceFiles[sourcePath]) != null ? _ref3.mtime : void 0)) {
+ source = this.cssSourceFiles[sourcePath].data.toString('utf8');
+ } else {
+ data = fs.readFileSync(this.absPath(sourcePath));
+ this.cssSourceFiles[sourcePath] = {
+ data: data,
+ mtime: stats.mtime
+ };
+ source = data.toString('utf8');
+ }
+ startTime = new Date;
+ css = cssCompilers[ext].compileSync(this.absPath(sourcePath), source);
+ if (css === ((_ref4 = this.compiledCss[sourcePath]) != null ? _ref4.data.toString('utf8') : void 0)) {
+ alreadyCached = true;
+ } else {
+ mtime = new Date;
+ this.compiledCss[sourcePath] = {
+ data: new Buffer(css),
+ mtime: mtime
+ };
+ }
+ }
+ if (alreadyCached && this.options.build) {
+ filename = this.buildFilenames[sourcePath];
+ return "/" + filename;
+ } else if (alreadyCached) {
+ return "/" + route;
+ } else if (this.options.build) {
+ filename = this.options.buildFilenamer(route, css);
+ this.buildFilenames[sourcePath] = filename;
+ cacheFlags = {
+ expires: this.options.buildsExpire,
+ mtime: mtime
+ };
+ this.cache.set(filename, css, cacheFlags);
+ if (this.options.buildDir) {
+ buildPath = path.join(process.cwd(), this.options.buildDir, filename);
+ mkdirRecursive(path.dirname(buildPath), 0755, function() {
+ return fs.writeFile(buildPath, css);
+ });
+ }
+ return this.cachedRoutePaths[route] = "/" + filename;
+ } else {
+ this.cache.set(route, css, {
+ mtime: mtime
+ });
+ return this.cachedRoutePaths[route] = "/" + route;
+ }
+ } catch (e) {
+ if (e.code === 'ENOENT') {
+ continue;
+ } else {
+ throw e;
+ }
+ }
+ }
+ throw new Error("No file found for route " + route);
+ };
+ ConnectAssets.prototype.compileJS = function(route) {
+ var callback, chain, ext, filename, js, snocketsFlags, sourcePath, _i, _len, _ref;
+ if (!this.options.detectChanges && this.cachedRoutePaths[route]) {
+ return this.cachedRoutePaths[route];
+ }
+ _ref = ['js'].concat((function() {
+ var _results;
+ _results = [];
+ for (ext in jsCompilers) {
+ _results.push(ext);
+ }
+ return _results;
+ })());
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ ext = _ref[_i];
+ sourcePath = stripExt(route) + ("." + ext);
+ try {
+ if (this.options.build) {
+ filename = null;
+ callback = __bind(function(err, concatenation, changed) {
+ var buildDir, buildPath, cacheFlags;
+ if (err) {
+ throw err;
+ }
+ if (changed) {
+ filename = this.options.buildFilenamer(route, concatenation);
+ this.buildFilenames[sourcePath] = filename;
+ cacheFlags = {
+ expires: this.options.buildsExpire
+ };
+ this.cache.set(filename, concatenation, cacheFlags);
+ if (buildDir = this.options.buildDir) {
+ buildPath = path.join(process.cwd(), buildDir, filename);
+ return mkdirRecursive(path.dirname(buildPath), 0755, function(err) {
+ return fs.writeFile(buildPath, concatenation);
+ });
+ }
+ } else {
+ return filename = this.buildFilenames[sourcePath];
+ }
+ }, this);
+ snocketsFlags = {
+ minify: this.options.minifyBuilds,
+ async: false
+ };
+ this.snockets.getConcatenation(sourcePath, snocketsFlags, callback);
+ return this.cachedRoutePaths[route] = ["/" + filename];
+ } else {
+ chain = this.snockets.getCompiledChain(sourcePath, {
+ async: false
+ });
+