Permalink
Browse files

add server tasks so we can do local dev

  • Loading branch information...
1 parent 0438f8d commit d649a14d4466216ca47d9c1276646defb5d009f4 @JoeGermuska JoeGermuska committed Apr 30, 2013
Showing with 16,004 additions and 3 deletions.
  1. +34 −2 Gruntfile.js
  2. +1 −1 homepage/index.html
  3. +1 −0 node_modules/.bin/grunt-open
  4. +6 −0 node_modules/grunt-contrib-connect/.travis.yml
  5. +3 −0 node_modules/grunt-contrib-connect/AUTHORS
  6. +29 −0 node_modules/grunt-contrib-connect/CHANGELOG
  7. +1 −0 node_modules/grunt-contrib-connect/CONTRIBUTING.md
  8. +63 −0 node_modules/grunt-contrib-connect/Gruntfile.js
  9. +22 −0 node_modules/grunt-contrib-connect/LICENSE-MIT
  10. +12 −0 node_modules/grunt-contrib-connect/node_modules/connect/.npmignore
  11. +5 −0 node_modules/grunt-contrib-connect/node_modules/connect/.travis.yml
  12. +24 −0 node_modules/grunt-contrib-connect/node_modules/connect/LICENSE
  13. +133 −0 node_modules/grunt-contrib-connect/node_modules/connect/Readme.md
  14. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/index.js
  15. +81 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/cache.js
  16. +92 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/connect.js
  17. +50 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/index.js
  18. +103 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/basicAuth.js
  19. +61 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/bodyParser.js
  20. +152 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
  21. +62 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieParser.js
  22. +117 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieSession.js
  23. +73 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/csrf.js
  24. +229 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js
  25. +86 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/errorHandler.js
  26. +80 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/favicon.js
  27. +86 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/json.js
  28. +78 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/limit.js
  29. +339 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/logger.js
  30. +40 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/methodOverride.js
  31. +133 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/multipart.js
  32. +46 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/query.js
  33. +32 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/responseTime.js
  34. +356 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session.js
  35. +140 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session/cookie.js
  36. +129 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session/memory.js
  37. +116 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session/session.js
  38. +84 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session/store.js
  39. +95 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/static.js
  40. +231 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/staticCache.js
  41. +55 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/timeout.js
  42. +78 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/urlencoded.js
  43. +40 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/vhost.js
  44. +79 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/patch.js
  45. +230 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js
  46. +81 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/public/directory.html
  47. +14 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/public/error.html
  48. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/favicon.ico
  49. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page.png
  50. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_add.png
  51. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_attach.png
  52. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_code.png
  53. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_copy.png
  54. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_delete.png
  55. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_edit.png
  56. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_error.png
  57. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_excel.png
  58. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_find.png
  59. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_gear.png
  60. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_go.png
  61. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_green.png
  62. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_key.png
  63. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_lightning.png
  64. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_link.png
  65. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_paintbrush.png
  66. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_paste.png
  67. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_red.png
  68. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_refresh.png
  69. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_save.png
  70. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white.png
  71. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_acrobat.png
  72. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_actionscript.png
  73. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_add.png
  74. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_c.png
  75. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_camera.png
  76. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_cd.png
  77. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_code.png
  78. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_code_red.png
  79. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_coldfusion.png
  80. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_compressed.png
  81. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_copy.png
  82. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_cplusplus.png
  83. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_csharp.png
  84. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_cup.png
  85. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_database.png
  86. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_delete.png
  87. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_dvd.png
  88. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_edit.png
  89. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_error.png
  90. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_excel.png
  91. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_find.png
  92. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_flash.png
  93. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_freehand.png
  94. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_gear.png
  95. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_get.png
  96. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_go.png
  97. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_h.png
  98. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_horizontal.png
  99. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_key.png
  100. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_lightning.png
  101. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_link.png
  102. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_magnify.png
  103. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_medal.png
  104. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_office.png
  105. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_paint.png
  106. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_paintbrush.png
  107. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_paste.png
  108. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_php.png
  109. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_picture.png
  110. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_powerpoint.png
  111. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_put.png
  112. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_ruby.png
  113. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_stack.png
  114. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_star.png
  115. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_swoosh.png
  116. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_text.png
  117. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_text_width.png
  118. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_tux.png
  119. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_vector.png
  120. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_visualstudio.png
  121. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_width.png
  122. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_word.png
  123. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_world.png
  124. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_wrench.png
  125. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_white_zip.png
  126. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_word.png
  127. BIN node_modules/grunt-contrib-connect/node_modules/connect/lib/public/icons/page_world.png
  128. +141 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/public/style.css
  129. +404 −0 node_modules/grunt-contrib-connect/node_modules/connect/lib/utils.js
  130. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/.npmignore
  131. +8 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/.travis.yml
  132. +47 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/README.md
  133. +88 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/index.js
  134. +36 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/package.json
  135. +89 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/buffer-crc32/tests/crc.test.js
  136. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/.npmignore
  137. +10 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/History.md
  138. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/Makefile
  139. +51 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/Readme.md
  140. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/component.json
  141. +39 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/index.js
  142. +20 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/bytes/package.json
  143. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/.npmignore
  144. +11 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/History.md
  145. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/Makefile
  146. +42 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/Readme.md
  147. +42 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/index.js
  148. +24 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie-signature/package.json
  149. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/.npmignore
  150. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/.travis.yml
  151. +44 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/README.md
  152. +61 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/index.js
  153. +33 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/package.json
  154. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/test/mocha.opts
  155. +28 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/test/parse.js
  156. +59 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/cookie/test/serialize.js
  157. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/.npmignore
  158. +62 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/History.md
  159. +115 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/Readme.md
  160. +9 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/component.json
  161. +124 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/debug.js
  162. +19 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/example/app.js
  163. +24 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/example/browser.html
  164. +10 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/example/wildcards.js
  165. +22 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/example/worker.js
  166. +5 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/index.js
  167. +134 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/lib/debug.js
  168. +37 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/debug/package.json
  169. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/.npmignore
  170. +5 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/.travis.yml
  171. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/LICENSE
  172. +411 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/Readme.md
  173. +71 −0 ...-contrib-connect/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js
  174. +67 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/example/json.js
  175. +43 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/example/post.js
  176. +48 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/example/upload.js
  177. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/index.js
  178. +72 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/file.js
  179. +526 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/incoming_form.js
  180. +3 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/index.js
  181. +35 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/json_parser.js
  182. +324 −0 ...odules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/multipart_parser.js
  183. +20 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/octet_parser.js
  184. +27 −0 ...ules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/lib/querystring_parser.js
  185. +38 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/package.json
  186. +18 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/common.js
  187. BIN ...contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png
  188. BIN ...-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz
  189. BIN ...es/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif
  190. +1 −0 ...-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt
  191. BIN ...contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png
  192. +1 −0 ...es/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt
  193. +3 −0 .../node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md
  194. +19 −0 ...es/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js
  195. +5 −0 ...odules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js
  196. +7 −0 ...grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js
  197. +7 −0 ...es/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js
  198. +21 −0 ...connect/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js
  199. +6 −0 ...grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js
  200. +72 −0 ...ules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/fixture/multipart.js
  201. +94 −0 ...nt-contrib-connect/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js
  202. +38 −0 .../grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/integration/test-json.js
  203. +45 −0 ...ontrib-connect/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js
  204. +24 −0 ..._modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/legacy/common.js
  205. +80 −0 ...ect/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js
  206. +104 −0 ...runt-contrib-connect/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js
  207. +733 −0 ...rib-connect/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
  208. +50 −0 ...-connect/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js
  209. +45 −0 ...onnect/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js
  210. +71 −0 ...onnect/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
  211. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/run.js
  212. +27 −0 ...b-connect/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js
  213. +48 −0 ...ct/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js
  214. +49 −0 ...unt-contrib-connect/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js
  215. +67 −0 ...modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/tools/base64.html
  216. +33 −0 ...modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/test/unit/test-file.js
  217. +63 −0 ...runt-contrib-connect/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
  218. +47 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/formidable/tool/record.js
  219. +1 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/.npmignore
  220. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Makefile
  221. +32 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Readme.md
  222. +49 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/index.js
  223. +20 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/package.json
  224. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/.npmignore
  225. +5 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/History.md
  226. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/Makefile
  227. +29 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/Readme.md
  228. +29 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/index.js
  229. +20 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/pause/package.json
  230. +6 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/qs/.gitmodules
  231. +7 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/qs/.npmignore
  232. +58 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/qs/Readme.md
  233. +328 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/qs/index.js
  234. +39 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/qs/package.json
  235. +4 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/.npmignore
  236. +25 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/History.md
  237. +8 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/Makefile
  238. +123 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/Readme.md
  239. +2 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/index.js
  240. +473 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/lib/send.js
  241. +47 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/lib/utils.js
  242. +19 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/LICENSE
  243. +63 −0 ..._modules/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/README.md
  244. +104 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/mime.js
  245. +32 −0 ...dules/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/package.json
  246. +55 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/test.js
  247. +1,510 −0 ...s/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/types/mime.types
  248. +65 −0 ...s/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/mime/types/node.types
  249. +1 −0 ...grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/.npmignore
  250. +15 −0 ...grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/History.md
  251. +7 −0 ...s/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/Makefile
  252. +28 −0 .../grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/Readme.md
  253. +49 −0 ...s/grunt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/index.js
  254. +20 −0 ...unt-contrib-connect/node_modules/connect/node_modules/send/node_modules/range-parser/package.json
  255. +34 −0 node_modules/grunt-contrib-connect/node_modules/connect/node_modules/send/package.json
  256. +50 −0 node_modules/grunt-contrib-connect/node_modules/connect/package.json
  257. +40 −0 node_modules/grunt-contrib-connect/node_modules/connect/test.js
  258. +65 −0 node_modules/grunt-contrib-connect/package.json
  259. +89 −0 node_modules/grunt-contrib-connect/tasks/connect.js
  260. +27 −0 node_modules/grunt-contrib-livereload/.jshintrc
  261. +1 −0 node_modules/grunt-contrib-livereload/AUTHORS
  262. +21 −0 node_modules/grunt-contrib-livereload/CHANGELOG
  263. +1 −0 node_modules/grunt-contrib-livereload/CONTRIBUTING.md
  264. +54 −0 node_modules/grunt-contrib-livereload/Gruntfile.js
  265. +22 −0 node_modules/grunt-contrib-livereload/LICENSE-MIT
  266. +41 −0 node_modules/grunt-contrib-livereload/docs/livereload-examples.md
  267. +8 −0 node_modules/grunt-contrib-livereload/docs/livereload-options.md
  268. +39 −0 node_modules/grunt-contrib-livereload/docs/livereload-overview.md
  269. +94 −0 node_modules/grunt-contrib-livereload/lib/utils.js
  270. +1 −0 node_modules/grunt-contrib-livereload/node_modules/.bin/tiny-lr
  271. +1 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/.npmignore
  272. +3 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/.travis.yml
  273. +68 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/bin/tiny-lr
  274. +13 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/bin/update-livereload
  275. +81 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/lib/client.js
  276. +22 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/lib/index.js
  277. +1,055 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/lib/public/livereload.js
  278. +203 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/lib/server.js
  279. +4 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/.npmignore
  280. +62 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/History.md
  281. +115 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/Readme.md
  282. +9 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/component.json
  283. +124 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/debug.js
  284. +19 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/example/app.js
  285. +24 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/example/browser.html
  286. +10 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/example/wildcards.js
  287. +22 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/example/worker.js
  288. +5 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/index.js
  289. +134 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/lib/debug.js
  290. +37 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/debug/package.json
  291. +62 −0 node_modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/CHANGELOG.txt
  292. +248 −0 ...modules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/README.markdown
  293. +44 −0 ...t-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/autobahn_client.js
  294. +22 −0 ...ules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/client.js
  295. +21 −0 ...s/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/haproxy.conf
  296. +70 −0 ...ules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/server.js
  297. +39 −0 ...dules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/sse.html
  298. +44 −0 ...odules/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/examples/ws.html
  299. +110 −0 ...grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/lib/faye/eventsource.js
  300. +93 −0 ...s/grunt-contrib-livereload/node_modules/tiny-lr/node_modules/faye-websocket/lib/faye/websocket.js
Sorry, we could not display the entire diff because too many files (622) changed.
View
36 Gruntfile.js
@@ -1,5 +1,10 @@
'use strict';
+// Variables
+var path = require('path'),
+ port = 8000,
+ lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
+
module.exports = function(grunt) {
// configurable paths
@@ -20,6 +25,33 @@ module.exports = function(grunt) {
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;\n' +
' */\n',
+ // Development server
+ connect: {
+ livereload: {
+ options: {
+ port: port,
+ middleware: function(connect, options) {
+ return [lrSnippet, connect.static(path.resolve('.'))]
+ }
+ }
+ }
+ },
+
+ // Open
+ open: {
+ dev: {
+ path: 'http://localhost:' + port + '/homepage/index.html'
+ }
+ },
+
+ // Regarde (Watch)
+ regarde: {
+ html: {
+ files: 'homepage/*.html',
+ tasks: ['livereload']
+ }
+ },
+
// Uglify
uglify: {
uncompressed: {
@@ -81,8 +113,8 @@ module.exports = function(grunt) {
// Load all Grunt task
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
- grunt.loadNpmTasks('grunt-contrib-clean');
-
// Define complex tasks
+ grunt.registerTask('server', ['livereload-start', 'connect', 'regarde']);
grunt.registerTask('build', ['clean', 'copy', 'uglify', 'concat']);
+ grunt.registerTask('default', ['open:dev', 'server']);
};
View
2 homepage/index.html
@@ -13,7 +13,7 @@
<script src="jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://w.soundcloud.com/player/api.js" type="text/javascript"></script>
<script src="homepage.js" type="text/javascript"></script>
- <script src="soundcite.js" type="text/javascript"></script>
+ <script src="../soundcite/js/soundcite.js" type="text/javascript"></script>
<script src="bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
View
1 node_modules/.bin/grunt-open
View
6 node_modules/grunt-contrib-connect/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+before_script:
+ - npm install -g grunt-cli
View
3 node_modules/grunt-contrib-connect/AUTHORS
@@ -0,0 +1,3 @@
+"Cowboy" Ben Alman (http://benalman.com)
+Tyler Kellen (http://goingslowly.com)
+Sindre Sorhus (http://sindresorhus.com)
View
29 node_modules/grunt-contrib-connect/CHANGELOG
@@ -0,0 +1,29 @@
+v0.3.0:
+ date: 2013-04-10
+ changes:
+ - Add ability to listen on system-assigned port.
+v0.2.0:
+ date: 2013-03-07
+ changes:
+ - Upgrade connect dependency.
+v0.1.2:
+ date: 2013-02-17
+ changes:
+ - Ensure Gruntfile.js is included on npm.
+v0.1.1:
+ date: 2013-02-15
+ changes:
+ - First official release for Grunt 0.4.0.
+v0.1.1rc6:
+ date: 2013-01-18
+ changes:
+ - Updating grunt/gruntplugin dependencies to rc6.
+ - Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
+v0.1.1rc5:
+ date: 2013-01-09
+ changes:
+ - Updating to work with grunt v0.4.0rc5.
+v0.1.0:
+ date: 2012-11-01
+ changes:
+ - Work in progress, not yet officially released.
View
1 node_modules/grunt-contrib-connect/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please see the [Contributing to grunt](http://gruntjs.com/contributing) guide for information on contributing to this project.
View
63 node_modules/grunt-contrib-connect/Gruntfile.js
@@ -0,0 +1,63 @@
+/*
+ * grunt-contrib-connect
+ * http://gruntjs.com/
+ *
+ * Copyright (c) 2012 "Cowboy" Ben Alman, contributors
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+module.exports = function(grunt) {
+ grunt.initConfig({
+ jshint: {
+ all: [
+ 'Gruntfile.js',
+ 'tasks/*.js',
+ '<%= nodeunit.tests %>'
+ ],
+ options: {
+ jshintrc: '.jshintrc'
+ }
+ },
+
+ nodeunit: {
+ tests: ['test/*_test.js']
+ },
+
+ connect: {
+ custom_base: {
+ options: {
+ base: 'test',
+ },
+ },
+ custom_port: {
+ options: {
+ port: 9000,
+ },
+ },
+ custom_middleware: {
+ options: {
+ port: 9001,
+ middleware: function(connect, options) {
+ // Return array of whatever middlewares you want
+ return [
+ function(req, res, next) {
+ res.end('Hello from port ' + options.port);
+ }
+ ];
+ },
+ },
+ },
+ }
+ });
+
+ grunt.loadTasks('tasks');
+
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-internal');
+
+ grunt.registerTask('test', ['connect', 'nodeunit']);
+ grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
+};
View
22 node_modules/grunt-contrib-connect/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2012 "Cowboy" Ben Alman, contributors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
12 node_modules/grunt-contrib-connect/node_modules/connect/.npmignore
@@ -0,0 +1,12 @@
+*.markdown
+*.md
+.git*
+Makefile
+benchmarks/
+docs/
+examples/
+install.sh
+support/
+test/
+.DS_Store
+coverage.html
View
5 node_modules/grunt-contrib-connect/node_modules/connect/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.6"
+ - "0.8"
+ - "0.10"
View
24 node_modules/grunt-contrib-connect/node_modules/connect/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
133 node_modules/grunt-contrib-connect/node_modules/connect/Readme.md
@@ -0,0 +1,133 @@
+[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect)
+# Connect
+
+ Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance "plugins" known as _middleware_.
+
+ Connect is bundled with over _20_ commonly used middleware, including
+ a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/).
+
+```js
+var connect = require('connect')
+ , http = require('http');
+
+var app = connect()
+ .use(connect.favicon())
+ .use(connect.logger('dev'))
+ .use(connect.static('public'))
+ .use(connect.directory('public'))
+ .use(connect.cookieParser())
+ .use(connect.session({ secret: 'my secret here' }))
+ .use(function(req, res){
+ res.end('Hello from Connect!\n');
+ });
+
+http.createServer(app).listen(3000);
+```
+
+## Middleware
+
+ - [csrf](http://www.senchalabs.org/connect/csrf.html)
+ - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html)
+ - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html)
+ - [json](http://www.senchalabs.org/connect/json.html)
+ - [multipart](http://www.senchalabs.org/connect/multipart.html)
+ - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html)
+ - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html)
+ - [directory](http://www.senchalabs.org/connect/directory.html)
+ - [compress](http://www.senchalabs.org/connect/compress.html)
+ - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html)
+ - [favicon](http://www.senchalabs.org/connect/favicon.html)
+ - [limit](http://www.senchalabs.org/connect/limit.html)
+ - [logger](http://www.senchalabs.org/connect/logger.html)
+ - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html)
+ - [query](http://www.senchalabs.org/connect/query.html)
+ - [responseTime](http://www.senchalabs.org/connect/responseTime.html)
+ - [session](http://www.senchalabs.org/connect/session.html)
+ - [static](http://www.senchalabs.org/connect/static.html)
+ - [staticCache](http://www.senchalabs.org/connect/staticCache.html)
+ - [vhost](http://www.senchalabs.org/connect/vhost.html)
+ - [subdomains](http://www.senchalabs.org/connect/subdomains.html)
+ - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html)
+
+## Running Tests
+
+first:
+
+ $ npm install -d
+
+then:
+
+ $ make test
+
+## Authors
+
+ Below is the output from [git-summary](http://github.com/visionmedia/git-extras).
+
+
+ project: connect
+ commits: 2033
+ active : 301 days
+ files : 171
+ authors:
+ 1414 Tj Holowaychuk 69.6%
+ 298 visionmedia 14.7%
+ 191 Tim Caswell 9.4%
+ 51 TJ Holowaychuk 2.5%
+ 10 Ryan Olds 0.5%
+ 8 Astro 0.4%
+ 5 Nathan Rajlich 0.2%
+ 5 Jakub Nešetřil 0.2%
+ 3 Daniel Dickison 0.1%
+ 3 David Rio Deiros 0.1%
+ 3 Alexander Simmerl 0.1%
+ 3 Andreas Lind Petersen 0.1%
+ 2 Aaron Heckmann 0.1%
+ 2 Jacques Crocker 0.1%
+ 2 Fabian Jakobs 0.1%
+ 2 Brian J Brennan 0.1%
+ 2 Adam Malcontenti-Wilson 0.1%
+ 2 Glen Mailer 0.1%
+ 2 James Campos 0.1%
+ 1 Trent Mick 0.0%
+ 1 Troy Kruthoff 0.0%
+ 1 Wei Zhu 0.0%
+ 1 comerc 0.0%
+ 1 darobin 0.0%
+ 1 nateps 0.0%
+ 1 Marco Sanson 0.0%
+ 1 Arthur Taylor 0.0%
+ 1 Aseem Kishore 0.0%
+ 1 Bart Teeuwisse 0.0%
+ 1 Cameron Howey 0.0%
+ 1 Chad Weider 0.0%
+ 1 Craig Barnes 0.0%
+ 1 Eran Hammer-Lahav 0.0%
+ 1 Gregory McWhirter 0.0%
+ 1 Guillermo Rauch 0.0%
+ 1 Jae Kwon 0.0%
+ 1 Jakub Nesetril 0.0%
+ 1 Joshua Peek 0.0%
+ 1 Jxck 0.0%
+ 1 AJ ONeal 0.0%
+ 1 Michael Hemesath 0.0%
+ 1 Morten Siebuhr 0.0%
+ 1 Samori Gorse 0.0%
+ 1 Tom Jensen 0.0%
+
+## Node Compatibility
+
+ Connect `< 1.x` is compatible with node 0.2.x
+
+
+ Connect `1.x` is compatible with node 0.4.x
+
+
+ Connect (_master_) `2.x` is compatible with node 0.6.x
+
+## CLA
+
+ [http://sencha.com/cla](http://sencha.com/cla)
+
+## License
+
+View the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).
View
4 node_modules/grunt-contrib-connect/node_modules/connect/index.js
@@ -0,0 +1,4 @@
+
+module.exports = process.env.CONNECT_COV
+ ? require('./lib-cov/connect')
+ : require('./lib/connect');
View
81 node_modules/grunt-contrib-connect/node_modules/connect/lib/cache.js
@@ -0,0 +1,81 @@
+
+/*!
+ * Connect - Cache
+ * Copyright(c) 2011 Sencha Inc.
+ * MIT Licensed
+ */
+
+/**
+ * Expose `Cache`.
+ */
+
+module.exports = Cache;
+
+/**
+ * LRU cache store.
+ *
+ * @param {Number} limit
+ * @api private
+ */
+
+function Cache(limit) {
+ this.store = {};
+ this.keys = [];
+ this.limit = limit;
+}
+
+/**
+ * Touch `key`, promoting the object.
+ *
+ * @param {String} key
+ * @param {Number} i
+ * @api private
+ */
+
+Cache.prototype.touch = function(key, i){
+ this.keys.splice(i,1);
+ this.keys.push(key);
+};
+
+/**
+ * Remove `key`.
+ *
+ * @param {String} key
+ * @api private
+ */
+
+Cache.prototype.remove = function(key){
+ delete this.store[key];
+};
+
+/**
+ * Get the object stored for `key`.
+ *
+ * @param {String} key
+ * @return {Array}
+ * @api private
+ */
+
+Cache.prototype.get = function(key){
+ return this.store[key];
+};
+
+/**
+ * Add a cache `key`.
+ *
+ * @param {String} key
+ * @return {Array}
+ * @api private
+ */
+
+Cache.prototype.add = function(key){
+ // initialize store
+ var len = this.keys.push(key);
+
+ // limit reached, invalidate LRU
+ if (len > this.limit) this.remove(this.keys.shift());
+
+ var arr = this.store[key] = [];
+ arr.createdAt = new Date;
+ return arr;
+};
View
92 node_modules/grunt-contrib-connect/node_modules/connect/lib/connect.js
@@ -0,0 +1,92 @@
+/*!
+ * Connect
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter
+ , proto = require('./proto')
+ , utils = require('./utils')
+ , path = require('path')
+ , basename = path.basename
+ , fs = require('fs');
+
+// node patches
+
+require('./patch');
+
+// expose createServer() as the module
+
+exports = module.exports = createServer;
+
+/**
+ * Framework version.
+ */
+
+exports.version = '2.7.6';
+
+/**
+ * Expose mime module.
+ */
+
+exports.mime = require('./middleware/static').mime;
+
+/**
+ * Expose the prototype.
+ */
+
+exports.proto = proto;
+
+/**
+ * Auto-load middleware getters.
+ */
+
+exports.middleware = {};
+
+/**
+ * Expose utilities.
+ */
+
+exports.utils = utils;
+
+/**
+ * Create a new connect server.
+ *
+ * @return {Function}
+ * @api public
+ */
+
+function createServer() {
+ function app(req, res, next){ app.handle(req, res, next); }
+ utils.merge(app, proto);
+ utils.merge(app, EventEmitter.prototype);
+ app.route = '/';
+ app.stack = [];
+ for (var i = 0; i < arguments.length; ++i) {
+ app.use(arguments[i]);
+ }
+ return app;
+};
+
+/**
+ * Support old `.createServer()` method.
+ */
+
+createServer.createServer = createServer;
+
+/**
+ * Auto-load bundled middleware with getters.
+ */
+
+fs.readdirSync(__dirname + '/middleware').forEach(function(filename){
+ if (!/\.js$/.test(filename)) return;
+ var name = basename(filename, '.js');
+ function load(){ return require('./middleware/' + name); }
+ exports.middleware.__defineGetter__(name, load);
+ exports.__defineGetter__(name, load);
+});
View
50 node_modules/grunt-contrib-connect/node_modules/connect/lib/index.js
@@ -0,0 +1,50 @@
+
+/**
+ * Connect is a middleware framework for node,
+ * shipping with over 18 bundled middleware and a rich selection of
+ * 3rd-party middleware.
+ *
+ * var app = connect()
+ * .use(connect.logger('dev'))
+ * .use(connect.static('public'))
+ * .use(function(req, res){
+ * res.end('hello world\n');
+ * })
+ * .listen(3000);
+ *
+ * Installation:
+ *
+ * $ npm install connect
+ *
+ * Middleware:
+ *
+ * - [logger](logger.html) request logger with custom format support
+ * - [csrf](csrf.html) Cross-site request forgery protection
+ * - [compress](compress.html) Gzip compression middleware
+ * - [basicAuth](basicAuth.html) basic http authentication
+ * - [bodyParser](bodyParser.html) extensible request body parser
+ * - [json](json.html) application/json parser
+ * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser
+ * - [multipart](multipart.html) multipart/form-data parser
+ * - [timeout](timeout.html) request timeouts
+ * - [cookieParser](cookieParser.html) cookie parser
+ * - [session](session.html) session management support with bundled MemoryStore
+ * - [cookieSession](cookieSession.html) cookie-based session support
+ * - [methodOverride](methodOverride.html) faux HTTP method support
+ * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time
+ * - [staticCache](staticCache.html) memory cache layer for the static() middleware
+ * - [static](static.html) streaming static file server supporting `Range` and more
+ * - [directory](directory.html) directory listing middleware
+ * - [vhost](vhost.html) virtual host sub-domain mapping middleware
+ * - [favicon](favicon.html) efficient favicon server (with default icon)
+ * - [limit](limit.html) limit the bytesize of request bodies
+ * - [query](query.html) automatic querystring parser, populating `req.query`
+ * - [errorHandler](errorHandler.html) flexible error handler
+ *
+ * Links:
+ *
+ * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware
+ * - GitHub [repository](http://github.com/senchalabs/connect)
+ * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md)
+ *
+ */
View
103 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/basicAuth.js
@@ -0,0 +1,103 @@
+
+/*!
+ * Connect - basicAuth
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('../utils')
+ , unauthorized = utils.unauthorized;
+
+/**
+ * Basic Auth:
+ *
+ * Enfore basic authentication by providing a `callback(user, pass)`,
+ * which must return `true` in order to gain access. Alternatively an async
+ * method is provided as well, invoking `callback(user, pass, callback)`. Populates
+ * `req.user`. The final alternative is simply passing username / password
+ * strings.
+ *
+ * Simple username and password
+ *
+ * connect(connect.basicAuth('username', 'password'));
+ *
+ * Callback verification
+ *
+ * connect()
+ * .use(connect.basicAuth(function(user, pass){
+ * return 'tj' == user & 'wahoo' == pass;
+ * }))
+ *
+ * Async callback verification, accepting `fn(err, user)`.
+ *
+ * connect()
+ * .use(connect.basicAuth(function(user, pass, fn){
+ * User.authenticate({ user: user, pass: pass }, fn);
+ * }))
+ *
+ * @param {Function|String} callback or username
+ * @param {String} realm
+ * @api public
+ */
+
+module.exports = function basicAuth(callback, realm) {
+ var username, password;
+
+ // user / pass strings
+ if ('string' == typeof callback) {
+ username = callback;
+ password = realm;
+ if ('string' != typeof password) throw new Error('password argument required');
+ realm = arguments[2];
+ callback = function(user, pass){
+ return user == username && pass == password;
+ }
+ }
+
+ realm = realm || 'Authorization Required';
+
+ return function(req, res, next) {
+ var authorization = req.headers.authorization;
+
+ if (req.user) return next();
+ if (!authorization) return unauthorized(res, realm);
+
+ var parts = authorization.split(' ');
+
+ if (parts.length !== 2) return next(utils.error(400));
+
+ var scheme = parts[0]
+ , credentials = new Buffer(parts[1], 'base64').toString()
+ , index = credentials.indexOf(':');
+
+ if ('Basic' != scheme || index < 0) return next(utils.error(400));
+
+ var user = credentials.slice(0, index)
+ , pass = credentials.slice(index + 1);
+
+ // async
+ if (callback.length >= 3) {
+ var pause = utils.pause(req);
+ callback(user, pass, function(err, user){
+ if (err || !user) return unauthorized(res, realm);
+ req.user = req.remoteUser = user;
+ next();
+ pause.resume();
+ });
+ // sync
+ } else {
+ if (callback(user, pass)) {
+ req.user = req.remoteUser = user;
+ next();
+ } else {
+ unauthorized(res, realm);
+ }
+ }
+ }
+};
+
View
61 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/bodyParser.js
@@ -0,0 +1,61 @@
+
+/*!
+ * Connect - bodyParser
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var multipart = require('./multipart')
+ , urlencoded = require('./urlencoded')
+ , json = require('./json');
+
+/**
+ * Body parser:
+ *
+ * Parse request bodies, supports _application/json_,
+ * _application/x-www-form-urlencoded_, and _multipart/form-data_.
+ *
+ * This is equivalent to:
+ *
+ * app.use(connect.json());
+ * app.use(connect.urlencoded());
+ * app.use(connect.multipart());
+ *
+ * Examples:
+ *
+ * connect()
+ * .use(connect.bodyParser())
+ * .use(function(req, res) {
+ * res.end('viewing user ' + req.body.user.name);
+ * });
+ *
+ * $ curl -d 'user[name]=tj' http://local/
+ * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/
+ *
+ * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info.
+ *
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function bodyParser(options){
+ var _urlencoded = urlencoded(options)
+ , _multipart = multipart(options)
+ , _json = json(options);
+
+ return function bodyParser(req, res, next) {
+ _json(req, res, function(err){
+ if (err) return next(err);
+ _urlencoded(req, res, function(err){
+ if (err) return next(err);
+ _multipart(req, res, next);
+ });
+ });
+ }
+};
View
152 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
@@ -0,0 +1,152 @@
+/*!
+ * Connect - compress
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var zlib = require('zlib');
+
+/**
+ * Supported content-encoding methods.
+ */
+
+exports.methods = {
+ gzip: zlib.createGzip
+ , deflate: zlib.createDeflate
+};
+
+/**
+ * Default filter function.
+ */
+
+exports.filter = function(req, res){
+ return /json|text|javascript/.test(res.getHeader('Content-Type'));
+};
+
+/**
+ * Compress:
+ *
+ * Compress response data with gzip/deflate.
+ *
+ * Filter:
+ *
+ * A `filter` callback function may be passed to
+ * replace the default logic of:
+ *
+ * exports.filter = function(req, res){
+ * return /json|text|javascript/.test(res.getHeader('Content-Type'));
+ * };
+ *
+ * Options:
+ *
+ * All remaining options are passed to the gzip/deflate
+ * creation functions. Consult node's docs for additional details.
+ *
+ * - `chunkSize` (default: 16*1024)
+ * - `windowBits`
+ * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression
+ * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more
+ * - `strategy`: compression strategy
+ *
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function compress(options) {
+ options = options || {};
+ var names = Object.keys(exports.methods)
+ , filter = options.filter || exports.filter;
+
+ return function compress(req, res, next){
+ var accept = req.headers['accept-encoding']
+ , vary = res.getHeader('Vary')
+ , write = res.write
+ , end = res.end
+ , stream
+ , method;
+
+ // vary
+ if (!vary) {
+ res.setHeader('Vary', 'Accept-Encoding');
+ } else if (!~vary.indexOf('Accept-Encoding')) {
+ res.setHeader('Vary', vary + ', Accept-Encoding');
+ }
+
+ // proxy
+
+ res.write = function(chunk, encoding){
+ if (!this.headerSent) this._implicitHeader();
+ return stream
+ ? stream.write(new Buffer(chunk, encoding))
+ : write.call(res, chunk, encoding);
+ };
+
+ res.end = function(chunk, encoding){
+ if (chunk) this.write(chunk, encoding);
+ return stream
+ ? stream.end()
+ : end.call(res);
+ };
+
+ res.on('header', function(){
+ var encoding = res.getHeader('Content-Encoding') || 'identity';
+
+ // already encoded
+ if ('identity' != encoding) return;
+
+ // default request filter
+ if (!filter(req, res)) return;
+
+ // SHOULD use identity
+ if (!accept) return;
+
+ // head
+ if ('HEAD' == req.method) return;
+
+ // default to gzip
+ if ('*' == accept.trim()) method = 'gzip';
+
+ // compression method
+ if (!method) {
+ for (var i = 0, len = names.length; i < len; ++i) {
+ if (~accept.indexOf(names[i])) {
+ method = names[i];
+ break;
+ }
+ }
+ }
+
+ // compression method
+ if (!method) return;
+
+ // compression stream
+ stream = exports.methods[method](options);
+
+ // header fields
+ res.setHeader('Content-Encoding', method);
+ res.removeHeader('Content-Length');
+
+ // compression
+
+ stream.on('data', function(chunk){
+ write.call(res, chunk);
+ });
+
+ stream.on('end', function(){
+ end.call(res);
+ });
+
+ stream.on('drain', function() {
+ res.emit('drain');
+ });
+ });
+
+ next();
+ };
+};
View
62 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieParser.js
@@ -0,0 +1,62 @@
+
+/*!
+ * Connect - cookieParser
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('./../utils')
+ , cookie = require('cookie');
+
+/**
+ * Cookie parser:
+ *
+ * Parse _Cookie_ header and populate `req.cookies`
+ * with an object keyed by the cookie names. Optionally
+ * you may enabled signed cookie support by passing
+ * a `secret` string, which assigns `req.secret` so
+ * it may be used by other middleware.
+ *
+ * Examples:
+ *
+ * connect()
+ * .use(connect.cookieParser('optional secret string'))
+ * .use(function(req, res, next){
+ * res.end(JSON.stringify(req.cookies));
+ * })
+ *
+ * @param {String} secret
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function cookieParser(secret){
+ return function cookieParser(req, res, next) {
+ if (req.cookies) return next();
+ var cookies = req.headers.cookie;
+
+ req.secret = secret;
+ req.cookies = {};
+ req.signedCookies = {};
+
+ if (cookies) {
+ try {
+ req.cookies = cookie.parse(cookies);
+ if (secret) {
+ req.signedCookies = utils.parseSignedCookies(req.cookies, secret);
+ req.signedCookies = utils.parseJSONCookies(req.signedCookies);
+ }
+ req.cookies = utils.parseJSONCookies(req.cookies);
+ } catch (err) {
+ err.status = 400;
+ return next(err);
+ }
+ }
+ next();
+ };
+};
View
117 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieSession.js
@@ -0,0 +1,117 @@
+
+/*!
+ * Connect - cookieSession
+ * Copyright(c) 2011 Sencha Inc.
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('./../utils')
+ , Cookie = require('./session/cookie')
+ , debug = require('debug')('connect:cookieSession')
+ , signature = require('cookie-signature')
+ , crc32 = require('buffer-crc32');
+
+/**
+ * Cookie Session:
+ *
+ * Cookie session middleware.
+ *
+ * var app = connect();
+ * app.use(connect.cookieParser());
+ * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }}));
+ *
+ * Options:
+ *
+ * - `key` cookie name defaulting to `connect.sess`
+ * - `secret` prevents cookie tampering
+ * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }`
+ * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto")
+ *
+ * Clearing sessions:
+ *
+ * To clear the session simply set its value to `null`,
+ * `cookieSession()` will then respond with a 1970 Set-Cookie.
+ *
+ * req.session = null;
+ *
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function cookieSession(options){
+ // TODO: utilize Session/Cookie to unify API
+ options = options || {};
+ var key = options.key || 'connect.sess'
+ , trustProxy = options.proxy;
+
+ return function cookieSession(req, res, next) {
+
+ // req.secret is for backwards compatibility
+ var secret = options.secret || req.secret;
+ if (!secret) throw new Error('`secret` option required for cookie sessions');
+
+ // default session
+ req.session = {};
+ var cookie = req.session.cookie = new Cookie(options.cookie);
+
+ // pathname mismatch
+ if (0 != req.originalUrl.indexOf(cookie.path)) return next();
+
+ // cookieParser secret
+ if (!options.secret && req.secret) {
+ req.session = req.signedCookies[key] || {};
+ req.session.cookie = cookie;
+ } else {
+ // TODO: refactor
+ var rawCookie = req.cookies[key];
+ if (rawCookie) {
+ var unsigned = utils.parseSignedCookie(rawCookie, secret);
+ if (unsigned) {
+ var originalHash = crc32.signed(unsigned);
+ req.session = utils.parseJSONCookie(unsigned) || {};
+ req.session.cookie = cookie;
+ }
+ }
+ }
+
+ res.on('header', function(){
+ // removed
+ if (!req.session) {
+ debug('clear session');
+ cookie.expires = new Date(0);
+ res.setHeader('Set-Cookie', cookie.serialize(key, ''));
+ return;
+ }
+
+ delete req.session.cookie;
+
+ // check security
+ var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()
+ , tls = req.connection.encrypted || (trustProxy && 'https' == proto)
+ , secured = cookie.secure && tls;
+
+ // only send secure cookies via https
+ if (cookie.secure && !secured) return debug('not secured');
+
+ // serialize
+ debug('serializing %j', req.session);
+ var val = 'j:' + JSON.stringify(req.session);
+
+ // compare hashes, no need to set-cookie if unchanged
+ if (originalHash == crc32.signed(val)) return debug('unmodified session');
+
+ // set-cookie
+ val = 's:' + signature.sign(val, secret);
+ val = cookie.serialize(key, val);
+ debug('set-cookie %j', cookie);
+ res.setHeader('Set-Cookie', val);
+ });
+
+ next();
+ };
+};
View
73 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/csrf.js
@@ -0,0 +1,73 @@
+/*!
+ * Connect - csrf
+ * Copyright(c) 2011 Sencha Inc.
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('../utils');
+
+/**
+ * Anti CSRF:
+ *
+ * CRSF protection middleware.
+ *
+ * By default this middleware generates a token named "_csrf"
+ * which should be added to requests which mutate
+ * state, within a hidden form field, query-string etc. This
+ * token is validated against the visitor's `req.session._csrf`
+ * property.
+ *
+ * The default `value` function checks `req.body` generated
+ * by the `bodyParser()` middleware, `req.query` generated
+ * by `query()`, and the "X-CSRF-Token" header field.
+ *
+ * This middleware requires session support, thus should be added
+ * somewhere _below_ `session()` and `cookieParser()`.
+ *
+ * Options:
+ *
+ * - `value` a function accepting the request, returning the token
+ *
+ * @param {Object} options
+ * @api public
+ */
+
+module.exports = function csrf(options) {
+ options = options || {};
+ var value = options.value || defaultValue;
+
+ return function(req, res, next){
+ // generate CSRF token
+ var token = req.session._csrf || (req.session._csrf = utils.uid(24));
+
+ // ignore these methods
+ if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next();
+
+ // determine value
+ var val = value(req);
+
+ // check
+ if (val != token) return next(utils.error(403));
+
+ next();
+ }
+};
+
+/**
+ * Default value function, checking the `req.body`
+ * and `req.query` for the CSRF token.
+ *
+ * @param {IncomingMessage} req
+ * @return {String}
+ * @api private
+ */
+
+function defaultValue(req) {
+ return (req.body && req.body._csrf)
+ || (req.query && req.query._csrf)
+ || (req.headers['x-csrf-token']);
+}
View
229 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js
@@ -0,0 +1,229 @@
+
+/*!
+ * Connect - directory
+ * Copyright(c) 2011 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+// TODO: icon / style for directories
+// TODO: arrow key navigation
+// TODO: make icons extensible
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+ , parse = require('url').parse
+ , utils = require('../utils')
+ , path = require('path')
+ , normalize = path.normalize
+ , extname = path.extname
+ , join = path.join;
+
+/*!
+ * Icon cache.
+ */
+
+var cache = {};
+
+/**
+ * Directory:
+ *
+ * Serve directory listings with the given `root` path.
+ *
+ * Options:
+ *
+ * - `hidden` display hidden (dot) files. Defaults to false.
+ * - `icons` display icons. Defaults to false.
+ * - `filter` Apply this filter function to files. Defaults to false.
+ *
+ * @param {String} root
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function directory(root, options){
+ options = options || {};
+
+ // root required
+ if (!root) throw new Error('directory() root path required');
+ var hidden = options.hidden
+ , icons = options.icons
+ , filter = options.filter
+ , root = normalize(root);
+
+ return function directory(req, res, next) {
+ if ('GET' != req.method && 'HEAD' != req.method) return next();
+
+ var accept = req.headers.accept || 'text/plain'
+ , url = parse(req.url)
+ , dir = decodeURIComponent(url.pathname)
+ , path = normalize(join(root, dir))
+ , originalUrl = parse(req.originalUrl)
+ , originalDir = decodeURIComponent(originalUrl.pathname)
+ , showUp = path != root && path != root + '/';
+
+ // null byte(s), bad request
+ if (~path.indexOf('\0')) return next(utils.error(400));
+
+ // malicious path, forbidden
+ if (0 != path.indexOf(root)) return next(utils.error(403));
+
+ // check if we have a directory
+ fs.stat(path, function(err, stat){
+ if (err) return 'ENOENT' == err.code
+ ? next()
+ : next(err);
+
+ if (!stat.isDirectory()) return next();
+
+ // fetch files
+ fs.readdir(path, function(err, files){
+ if (err) return next(err);
+ if (!hidden) files = removeHidden(files);
+ if (filter) files = files.filter(filter);
+ files.sort();
+
+ // content-negotiation
+ for (var key in exports) {
+ if (~accept.indexOf(key) || ~accept.indexOf('*/*')) {
+ exports[key](req, res, files, next, originalDir, showUp, icons);
+ return;
+ }
+ }
+
+ // not acceptable
+ next(utils.error(406));
+ });
+ });
+ };
+};
+
+/**
+ * Respond with text/html.
+ */
+
+exports.html = function(req, res, files, next, dir, showUp, icons){
+ fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){
+ if (err) return next(err);
+ fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){
+ if (err) return next(err);
+ if (showUp) files.unshift('..');
+ str = str
+ .replace('{style}', style)
+ .replace('{files}', html(files, dir, icons))
+ .replace('{directory}', dir)
+ .replace('{linked-path}', htmlPath(dir));
+ res.setHeader('Content-Type', 'text/html');
+ res.setHeader('Content-Length', str.length);
+ res.end(str);
+ });
+ });
+};
+
+/**
+ * Respond with application/json.
+ */
+
+exports.json = function(req, res, files){
+ files = JSON.stringify(files);
+ res.setHeader('Content-Type', 'application/json');
+ res.setHeader('Content-Length', files.length);
+ res.end(files);
+};
+
+/**
+ * Respond with text/plain.
+ */
+
+exports.plain = function(req, res, files){
+ files = files.join('\n') + '\n';
+ res.setHeader('Content-Type', 'text/plain');
+ res.setHeader('Content-Length', files.length);
+ res.end(files);
+};
+
+/**
+ * Map html `dir`, returning a linked path.
+ */
+
+function htmlPath(dir) {
+ var curr = [];
+ return dir.split('/').map(function(part){
+ curr.push(part);
+ return '<a href="' + curr.join('/') + '">' + part + '</a>';
+ }).join(' / ');
+}
+
+/**
+ * Map html `files`, returning an html unordered list.
+ */
+
+function html(files, dir, useIcons) {
+ return '<ul id="files">' + files.map(function(file){
+ var icon = ''
+ , classes = [];
+
+ if (useIcons && '..' != file) {
+ icon = icons[extname(file)] || icons.default;
+ icon = '<img src="data:image/png;base64,' + load(icon) + '" />';
+ classes.push('icon');
+ }
+
+ return '<li><a href="'
+ + join(dir, file)
+ + '" class="'
+ + classes.join(' ') + '"'
+ + ' title="' + file + '">'
+ + icon + file + '</a></li>';
+
+ }).join('\n') + '</ul>';
+}
+
+/**
+ * Load and cache the given `icon`.
+ *
+ * @param {String} icon
+ * @return {String}
+ * @api private
+ */
+
+function load(icon) {
+ if (cache[icon]) return cache[icon];
+ return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64');
+}
+
+/**
+ * Filter "hidden" `files`, aka files
+ * beginning with a `.`.
+ *
+ * @param {Array} files
+ * @return {Array}
+ * @api private
+ */
+
+function removeHidden(files) {
+ return files.filter(function(file){
+ return '.' != file[0];
+ });
+}
+
+/**
+ * Icon map.
+ */
+
+var icons = {
+ '.js': 'page_white_code_red.png'
+ , '.c': 'page_white_c.png'
+ , '.h': 'page_white_h.png'
+ , '.cc': 'page_white_cplusplus.png'
+ , '.php': 'page_white_php.png'
+ , '.rb': 'page_white_ruby.png'
+ , '.cpp': 'page_white_cplusplus.png'
+ , '.swf': 'page_white_flash.png'
+ , '.pdf': 'page_white_acrobat.png'
+ , 'default': 'page_white.png'
+};
View
86 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/errorHandler.js
@@ -0,0 +1,86 @@
+/*!
+ * Connect - errorHandler
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('../utils')
+ , fs = require('fs');
+
+// environment
+
+var env = process.env.NODE_ENV || 'development';
+
+/**
+ * Error handler:
+ *
+ * Development error handler, providing stack traces
+ * and error message responses for requests accepting text, html,
+ * or json.
+ *
+ * Text:
+ *
+ * By default, and when _text/plain_ is accepted a simple stack trace
+ * or error message will be returned.
+ *
+ * JSON:
+ *
+ * When _application/json_ is accepted, connect will respond with
+ * an object in the form of `{ "error": error }`.
+ *
+ * HTML:
+ *
+ * When accepted connect will output a nice html stack trace.
+ *
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function errorHandler(){
+ return function errorHandler(err, req, res, next){
+ if (err.status) res.statusCode = err.status;
+ if (res.statusCode < 400) res.statusCode = 500;
+ if ('test' != env) console.error(err.stack);
+ var accept = req.headers.accept || '';
+ // html
+ if (~accept.indexOf('html')) {
+ fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){
+ fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){
+ var stack = (err.stack || '')
+ .split('\n').slice(1)
+ .map(function(v){ return '<li>' + v + '</li>'; }).join('');
+ html = html
+ .replace('{style}', style)
+ .replace('{stack}', stack)
+ .replace('{title}', exports.title)
+ .replace('{statusCode}', res.statusCode)
+ .replace(/\{error\}/g, utils.escape(err.toString()));
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.end(html);
+ });
+ });
+ // json
+ } else if (~accept.indexOf('json')) {
+ var error = { message: err.message, stack: err.stack };
+ for (var prop in err) error[prop] = err[prop];
+ var json = JSON.stringify({ error: error });
+ res.setHeader('Content-Type', 'application/json');
+ res.end(json);
+ // plain text
+ } else {
+ res.writeHead(res.statusCode, { 'Content-Type': 'text/plain' });
+ res.end(err.stack);
+ }
+ };
+};
+
+/**
+ * Template title, framework authors may override this value.
+ */
+
+exports.title = 'Connect';
View
80 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/favicon.js
@@ -0,0 +1,80 @@
+/*!
+ * Connect - favicon
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+ , utils = require('../utils');
+
+/**
+ * Favicon:
+ *
+ * By default serves the connect favicon, or the favicon
+ * located by the given `path`.
+ *
+ * Options:
+ *
+ * - `maxAge` cache-control max-age directive, defaulting to 1 day
+ *
+ * Examples:
+ *
+ * Serve default favicon:
+ *
+ * connect()
+ * .use(connect.favicon())
+ *
+ * Serve favicon before logging for brevity:
+ *
+ * connect()
+ * .use(connect.favicon())
+ * .use(connect.logger('dev'))
+ *
+ * Serve custom favicon:
+ *
+ * connect()
+ * .use(connect.favicon('public/favicon.ico'))
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function favicon(path, options){
+ var options = options || {}
+ , path = path || __dirname + '/../public/favicon.ico'
+ , maxAge = options.maxAge || 86400000
+ , icon; // favicon cache
+
+ return function favicon(req, res, next){
+ if ('/favicon.ico' == req.url) {
+ if (icon) {
+ res.writeHead(200, icon.headers);
+ res.end(icon.body);
+ } else {
+ fs.readFile(path, function(err, buf){
+ if (err) return next(err);
+ icon = {
+ headers: {
+ 'Content-Type': 'image/x-icon'
+ , 'Content-Length': buf.length
+ , 'ETag': '"' + utils.md5(buf) + '"'
+ , 'Cache-Control': 'public, max-age=' + (maxAge / 1000)
+ },
+ body: buf
+ };
+ res.writeHead(200, icon.headers);
+ res.end(icon.body);
+ });
+ }
+ } else {
+ next();
+ }
+ };
+};
View
86 node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/json.js
@@ -0,0 +1,86 @@
+
+/*!
+ * Connect - json
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('../utils')
+ , _limit = require('./limit');
+
+/**
+ * noop middleware.
+ */
+
+function noop(req, res, next) {
+ next();
+}
+
+/**
+ * JSON:
+ *
+ * Parse JSON request bodies, providing the
+ * parsed object as `req.body`.
+ *
+ * Options:
+ *
+ * - `strict` when `false` anything `JSON.parse()` accepts will be parsed
+ * - `reviver` used as the second "reviver" argument for JSON.parse
+ * - `limit` byte limit disabled by default
+ *
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+exports = module.exports = function(options){
+ var options = options || {}
+ , strict = options.strict !== false;
+
+ var limit = options.limit
+ ? _limit(options.limit)
+ : noop;
+
+ return function json(req, res, next) {
+ if (req._body) return next();
+ req.body = req.body || {};
+
+ if (!utils.hasBody(req)) return next();
+
+ // check Content-Type
+ if ('application/json' != utils.mime(req)) return next();
+
+ // flag as parsed
+ req._body = true;
+
+ // parse
+ limit(req, res, function(err){
+ if (err) return next(err);
+ var buf = '';
+ req.setEncoding('utf8');
+ req.on('data', function(chunk){ buf += chunk });
+ req.on('end', function(){
+ var first = buf.trim()[0];
+
+ if (0 == buf.length) {
+ return next(utils.error(400, 'invalid json, empty body'));