snowball 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (589) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +1 -3
  3. data/{lib/snowball → bin}/roll.js +0 -0
  4. data/lib/snowball/roller.rb +1 -1
  5. data/lib/snowball/version.rb +1 -1
  6. data/node_modules/.bin/browserify +161 -0
  7. data/node_modules/.bin/cake +7 -0
  8. data/node_modules/.bin/coffee +7 -0
  9. data/node_modules/.bin/jade +168 -0
  10. data/node_modules/browserify/.travis.yml +4 -0
  11. data/node_modules/browserify/LICENSE +63 -0
  12. data/node_modules/browserify/README.markdown +172 -0
  13. data/node_modules/browserify/bin/cmd.js +161 -0
  14. data/node_modules/browserify/builtins/__browserify_process.js +55 -0
  15. data/node_modules/browserify/builtins/assert.js +314 -0
  16. data/node_modules/browserify/builtins/child_process.js +2 -0
  17. data/node_modules/browserify/builtins/events.js +178 -0
  18. data/node_modules/browserify/builtins/fs.js +1 -0
  19. data/node_modules/browserify/builtins/https.js +1 -0
  20. data/node_modules/browserify/builtins/net.js +1 -0
  21. data/node_modules/browserify/builtins/path.js +175 -0
  22. data/node_modules/browserify/builtins/querystring.js +250 -0
  23. data/node_modules/browserify/builtins/stream.js +119 -0
  24. data/node_modules/browserify/builtins/string_decoder.js +161 -0
  25. data/node_modules/browserify/builtins/sys.js +1 -0
  26. data/node_modules/browserify/builtins/timers.js +39 -0
  27. data/node_modules/browserify/builtins/tls.js +1 -0
  28. data/node_modules/browserify/builtins/tty.js +2 -0
  29. data/node_modules/browserify/builtins/url.js +604 -0
  30. data/node_modules/browserify/builtins/util.js +351 -0
  31. data/node_modules/browserify/example/debug/browserify.js +219 -0
  32. data/node_modules/browserify/example/debug/build.sh +3 -0
  33. data/node_modules/browserify/example/debug/index.html +7 -0
  34. data/node_modules/browserify/example/debug/js/entry.js +2 -0
  35. data/node_modules/browserify/example/debug/js/thrower.js +3 -0
  36. data/node_modules/browserify/example/debug/server.js +9 -0
  37. data/node_modules/browserify/example/simple-build/browserify.js +368 -0
  38. data/node_modules/browserify/example/simple-build/build.sh +3 -0
  39. data/node_modules/browserify/example/simple-build/index.html +9 -0
  40. data/node_modules/browserify/example/simple-build/js/bar.js +3 -0
  41. data/node_modules/browserify/example/simple-build/js/entry.js +5 -0
  42. data/node_modules/browserify/example/simple-build/js/foo.js +5 -0
  43. data/node_modules/browserify/example/simple-build/server.js +9 -0
  44. data/node_modules/browserify/example/test/b.js +5 -0
  45. data/node_modules/browserify/example/test/bar.js +3 -0
  46. data/node_modules/browserify/example/test/foo.js +3 -0
  47. data/node_modules/browserify/example/test/m.js +3 -0
  48. data/node_modules/browserify/example/test/n.js +3 -0
  49. data/node_modules/browserify/example/using-http/bundle.js +813 -0
  50. data/node_modules/browserify/example/using-http/entry.js +25 -0
  51. data/node_modules/browserify/example/using-http/index.html +9 -0
  52. data/node_modules/browserify/example/using-http/server.js +28 -0
  53. data/node_modules/browserify/index.js +202 -0
  54. data/node_modules/browserify/lib/watch.js +75 -0
  55. data/node_modules/browserify/lib/wrap.js +580 -0
  56. data/node_modules/browserify/lib/wrappers.js +10 -0
  57. data/node_modules/browserify/node_modules/buffer-browserify/.npmignore +1 -0
  58. data/node_modules/browserify/node_modules/buffer-browserify/README.md +11 -0
  59. data/node_modules/browserify/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
  60. data/node_modules/browserify/node_modules/buffer-browserify/index.js +1317 -0
  61. data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
  62. data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
  63. data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/package.json +30 -0
  64. data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
  65. data/node_modules/browserify/node_modules/buffer-browserify/package.json +46 -0
  66. data/node_modules/browserify/node_modules/buffer-browserify/test/buffer.js +218 -0
  67. data/node_modules/browserify/node_modules/commondir/README.markdown +45 -0
  68. data/node_modules/browserify/node_modules/commondir/example/base.js +3 -0
  69. data/node_modules/browserify/node_modules/commondir/example/dir.js +3 -0
  70. data/node_modules/browserify/node_modules/commondir/index.js +29 -0
  71. data/node_modules/browserify/node_modules/commondir/package.json +47 -0
  72. data/node_modules/browserify/node_modules/commondir/test/dirs.js +66 -0
  73. data/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +4 -0
  74. data/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +637 -0
  75. data/node_modules/browserify/node_modules/crypto-browserify/example/index.html +12 -0
  76. data/node_modules/browserify/node_modules/crypto-browserify/example/test.js +4 -0
  77. data/node_modules/browserify/node_modules/crypto-browserify/index.js +74 -0
  78. data/node_modules/browserify/node_modules/crypto-browserify/md5.js +384 -0
  79. data/node_modules/browserify/node_modules/crypto-browserify/package.json +33 -0
  80. data/node_modules/browserify/node_modules/crypto-browserify/readme.markdown +20 -0
  81. data/node_modules/browserify/node_modules/crypto-browserify/rng.js +37 -0
  82. data/node_modules/browserify/node_modules/crypto-browserify/sha.js +210 -0
  83. data/node_modules/browserify/node_modules/crypto-browserify/test/simple.js +35 -0
  84. data/node_modules/browserify/node_modules/deputy/.travis.yml +4 -0
  85. data/node_modules/browserify/node_modules/deputy/README.markdown +55 -0
  86. data/node_modules/browserify/node_modules/deputy/example/cache.js +5 -0
  87. data/node_modules/browserify/node_modules/deputy/index.js +46 -0
  88. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.npmignore +2 -0
  89. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.travis.yml +5 -0
  90. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/LICENSE +21 -0
  91. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +6 -0
  92. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +82 -0
  93. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +34 -0
  94. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +63 -0
  95. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +38 -0
  96. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +37 -0
  97. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +28 -0
  98. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +32 -0
  99. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +39 -0
  100. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +41 -0
  101. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +32 -0
  102. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +25 -0
  103. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +24 -0
  104. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +18 -0
  105. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +32 -0
  106. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +28 -0
  107. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +32 -0
  108. data/node_modules/browserify/node_modules/deputy/package.json +47 -0
  109. data/node_modules/browserify/node_modules/deputy/test/cache.js +58 -0
  110. data/node_modules/browserify/node_modules/detective/.travis.yml +4 -0
  111. data/node_modules/browserify/node_modules/detective/README.markdown +66 -0
  112. data/node_modules/browserify/node_modules/detective/example/strings.js +6 -0
  113. data/node_modules/browserify/node_modules/detective/example/strings_src.js +3 -0
  114. data/node_modules/browserify/node_modules/detective/index.js +60 -0
  115. data/node_modules/browserify/node_modules/detective/node_modules/.bin/esparse +42 -0
  116. data/node_modules/browserify/node_modules/detective/node_modules/esprima/.travis.yml +5 -0
  117. data/node_modules/browserify/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
  118. data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +74 -0
  119. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
  120. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
  121. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +360 -0
  122. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +487 -0
  123. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +164 -0
  124. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +12 -0
  125. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
  126. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +7 -0
  127. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
  128. data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +42 -0
  129. data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +92 -0
  130. data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +696 -0
  131. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +42 -0
  132. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +82 -0
  133. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +170 -0
  134. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +106 -0
  135. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +123 -0
  136. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +82 -0
  137. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +352 -0
  138. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +225 -0
  139. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +120 -0
  140. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +71 -0
  141. data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +3577 -0
  142. data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +103 -0
  143. data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +42 -0
  144. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
  145. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
  146. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
  147. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
  148. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
  149. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
  150. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
  151. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
  152. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
  153. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
  154. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
  155. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
  156. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
  157. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +588 -0
  158. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
  159. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
  160. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
  161. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
  162. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +878 -0
  163. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
  164. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
  165. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
  166. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
  167. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +328 -0
  168. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +140 -0
  169. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +270 -0
  170. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
  171. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
  172. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
  173. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
  174. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +3617 -0
  175. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +36 -0
  176. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +403 -0
  177. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +66 -0
  178. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +16659 -0
  179. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
  180. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +28 -0
  181. data/node_modules/browserify/node_modules/detective/package.json +47 -0
  182. data/node_modules/browserify/node_modules/detective/test/both.js +11 -0
  183. data/node_modules/browserify/node_modules/detective/test/chained.js +9 -0
  184. data/node_modules/browserify/node_modules/detective/test/files/both.js +4 -0
  185. data/node_modules/browserify/node_modules/detective/test/files/chained.js +5 -0
  186. data/node_modules/browserify/node_modules/detective/test/files/nested.js +22 -0
  187. data/node_modules/browserify/node_modules/detective/test/files/skip.js +7 -0
  188. data/node_modules/browserify/node_modules/detective/test/files/strings.js +13 -0
  189. data/node_modules/browserify/node_modules/detective/test/files/word.js +13 -0
  190. data/node_modules/browserify/node_modules/detective/test/nested.js +9 -0
  191. data/node_modules/browserify/node_modules/detective/test/skip.js +9 -0
  192. data/node_modules/browserify/node_modules/detective/test/strings.js +9 -0
  193. data/node_modules/browserify/node_modules/detective/test/word.js +12 -0
  194. data/node_modules/browserify/node_modules/http-browserify/.npmignore +1 -0
  195. data/node_modules/browserify/node_modules/http-browserify/example/get/index.html +9 -0
  196. data/node_modules/browserify/node_modules/http-browserify/example/get/main.js +14 -0
  197. data/node_modules/browserify/node_modules/http-browserify/example/get/server.js +12 -0
  198. data/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +9 -0
  199. data/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +18 -0
  200. data/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +15 -0
  201. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/data.json +139 -0
  202. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/index.html +9 -0
  203. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js +13 -0
  204. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.npmignore +2 -0
  205. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml +4 -0
  206. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
  207. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
  208. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
  209. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
  210. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
  211. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
  212. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
  213. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
  214. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
  215. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
  216. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
  217. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
  218. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
  219. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
  220. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
  221. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
  222. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
  223. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
  224. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
  225. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
  226. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
  227. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
  228. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
  229. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
  230. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
  231. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
  232. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
  233. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
  234. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
  235. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
  236. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/server.js +10 -0
  237. data/node_modules/browserify/node_modules/http-browserify/example/post/index.html +9 -0
  238. data/node_modules/browserify/node_modules/http-browserify/example/post/main.js +16 -0
  239. data/node_modules/browserify/node_modules/http-browserify/example/post/server.js +19 -0
  240. data/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +9 -0
  241. data/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +16 -0
  242. data/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +21 -0
  243. data/node_modules/browserify/node_modules/http-browserify/index.js +59 -0
  244. data/node_modules/browserify/node_modules/http-browserify/lib/request.js +128 -0
  245. data/node_modules/browserify/node_modules/http-browserify/lib/response.js +119 -0
  246. data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
  247. data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/package.json +30 -0
  248. data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
  249. data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
  250. data/node_modules/browserify/node_modules/http-browserify/package.json +46 -0
  251. data/node_modules/browserify/node_modules/http-browserify/readme.markdown +128 -0
  252. data/node_modules/browserify/node_modules/nub/README.markdown +23 -0
  253. data/node_modules/browserify/node_modules/nub/index.js +64 -0
  254. data/node_modules/browserify/node_modules/nub/package.json +46 -0
  255. data/node_modules/browserify/node_modules/nub/test/by.js +51 -0
  256. data/node_modules/browserify/node_modules/nub/test/nub.js +46 -0
  257. data/node_modules/browserify/node_modules/resolve/.travis.yml +4 -0
  258. data/node_modules/browserify/node_modules/resolve/LICENSE +18 -0
  259. data/node_modules/browserify/node_modules/resolve/README.markdown +47 -0
  260. data/node_modules/browserify/node_modules/resolve/index.js +106 -0
  261. data/node_modules/browserify/node_modules/resolve/package.json +45 -0
  262. data/node_modules/browserify/node_modules/resolve/test/core.js +12 -0
  263. data/node_modules/browserify/node_modules/resolve/test/filter.js +15 -0
  264. data/node_modules/browserify/node_modules/resolve/test/mock.js +64 -0
  265. data/node_modules/browserify/node_modules/resolve/test/resolver.js +157 -0
  266. data/node_modules/browserify/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  267. data/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  268. data/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +3 -0
  269. data/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  270. data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  271. data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  272. data/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +1 -0
  273. data/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +1 -0
  274. data/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee +0 -0
  275. data/node_modules/browserify/node_modules/resolve/test/resolver/mug.js +0 -0
  276. data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  277. data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  278. data/node_modules/browserify/node_modules/syntax-error/.travis.yml +4 -0
  279. data/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
  280. data/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
  281. data/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
  282. data/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
  283. data/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/esparse +42 -0
  284. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/.travis.yml +5 -0
  285. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
  286. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
  287. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
  288. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
  289. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
  290. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
  291. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
  292. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
  293. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
  294. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
  295. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
  296. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
  297. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
  298. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
  299. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
  300. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
  301. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
  302. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
  303. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
  304. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
  305. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
  306. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
  307. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
  308. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
  309. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
  310. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
  311. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
  312. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
  313. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
  314. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
  315. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
  316. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
  317. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
  318. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
  319. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
  320. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
  321. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
  322. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
  323. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
  324. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
  325. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
  326. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
  327. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
  328. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
  329. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
  330. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
  331. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
  332. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
  333. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
  334. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
  335. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
  336. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
  337. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
  338. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
  339. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
  340. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
  341. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
  342. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
  343. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
  344. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
  345. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
  346. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
  347. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
  348. data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
  349. data/node_modules/browserify/node_modules/syntax-error/package.json +49 -0
  350. data/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
  351. data/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
  352. data/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
  353. data/node_modules/browserify/node_modules/vm-browserify/README.markdown +103 -0
  354. data/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +473 -0
  355. data/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +6 -0
  356. data/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +9 -0
  357. data/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +6 -0
  358. data/node_modules/browserify/node_modules/vm-browserify/index.js +85 -0
  359. data/node_modules/browserify/node_modules/vm-browserify/package.json +43 -0
  360. data/node_modules/browserify/node_modules/vm-browserify/testling/run.js +22 -0
  361. data/node_modules/browserify/node_modules/vm-browserify/testling/test.sh +11 -0
  362. data/node_modules/browserify/package.json +78 -0
  363. data/node_modules/browserify/test/alias.js +58 -0
  364. data/node_modules/browserify/test/backbone.js +21 -0
  365. data/node_modules/browserify/test/bin.js +39 -0
  366. data/node_modules/browserify/test/buffer.js +99 -0
  367. data/node_modules/browserify/test/bundle.js +32 -0
  368. data/node_modules/browserify/test/cache.js +28 -0
  369. data/node_modules/browserify/test/coffee.js +39 -0
  370. data/node_modules/browserify/test/coffee/bar.js +1 -0
  371. data/node_modules/browserify/test/coffee/baz.coffee +1 -0
  372. data/node_modules/browserify/test/coffee/entry.coffee +1 -0
  373. data/node_modules/browserify/test/coffee/foo.coffee +1 -0
  374. data/node_modules/browserify/test/coffee/index.coffee +5 -0
  375. data/node_modules/browserify/test/coffee/nested/nested.coffee +2 -0
  376. data/node_modules/browserify/test/comment.js +17 -0
  377. data/node_modules/browserify/test/comment/main.js +2 -0
  378. data/node_modules/browserify/test/crypto.js +37 -0
  379. data/node_modules/browserify/test/dnode.js +27 -0
  380. data/node_modules/browserify/test/dollar.js +19 -0
  381. data/node_modules/browserify/test/dollar/dollar/index.js +7 -0
  382. data/node_modules/browserify/test/entry.js +36 -0
  383. data/node_modules/browserify/test/entry/main.js +1 -0
  384. data/node_modules/browserify/test/entry/one.js +1 -0
  385. data/node_modules/browserify/test/entry/two.js +1 -0
  386. data/node_modules/browserify/test/error_code.js +24 -0
  387. data/node_modules/browserify/test/error_code/src.js +2 -0
  388. data/node_modules/browserify/test/export.js +52 -0
  389. data/node_modules/browserify/test/export/entry.js +1 -0
  390. data/node_modules/browserify/test/field.js +64 -0
  391. data/node_modules/browserify/test/field/miss.js +1 -0
  392. data/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
  393. data/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
  394. data/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
  395. data/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
  396. data/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
  397. data/node_modules/browserify/test/field/node_modules/z-object/package.json +6 -0
  398. data/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
  399. data/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
  400. data/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
  401. data/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
  402. data/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
  403. data/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
  404. data/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
  405. data/node_modules/browserify/test/field/object.js +1 -0
  406. data/node_modules/browserify/test/field/string.js +1 -0
  407. data/node_modules/browserify/test/field/sub.js +1 -0
  408. data/node_modules/browserify/test/global.js +19 -0
  409. data/node_modules/browserify/test/global/main.js +2 -0
  410. data/node_modules/browserify/test/jade.js +35 -0
  411. data/node_modules/browserify/test/json.js +17 -0
  412. data/node_modules/browserify/test/json/beep.json +4 -0
  413. data/node_modules/browserify/test/json/main.js +1 -0
  414. data/node_modules/browserify/test/maxlisteners.js +8 -0
  415. data/node_modules/browserify/test/module.js +22 -0
  416. data/node_modules/browserify/test/multi_entry.js +20 -0
  417. data/node_modules/browserify/test/multi_entry/a.js +2 -0
  418. data/node_modules/browserify/test/multi_entry/b.js +2 -0
  419. data/node_modules/browserify/test/multi_entry/c.js +3 -0
  420. data/node_modules/browserify/test/multi_ignore.js +23 -0
  421. data/node_modules/browserify/test/node_modules/beep/index.js +1 -0
  422. data/node_modules/browserify/test/require_cache.js +18 -0
  423. data/node_modules/browserify/test/retarget.js +27 -0
  424. data/node_modules/browserify/test/seq.js +47 -0
  425. data/node_modules/browserify/test/subdep.js +26 -0
  426. data/node_modules/browserify/test/subdep/index.js +1 -0
  427. data/node_modules/browserify/test/subdep/package.json +6 -0
  428. data/node_modules/browserify/test/util.js +48 -0
  429. data/node_modules/browserify/test/watch.js +91 -0
  430. data/node_modules/browserify/test/watch/a.js +1 -0
  431. data/node_modules/browserify/test/wrap.js +43 -0
  432. data/node_modules/browserify/test/wrap/a.js +2 -0
  433. data/node_modules/browserify/test/wrap/c.js +1 -0
  434. data/node_modules/browserify/test/wrap/node_modules/b/main.js +1 -0
  435. data/node_modules/browserify/test/wrap/node_modules/b/package.json +3 -0
  436. data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +1 -0
  437. data/node_modules/browserify/test/wrap/skipme.js +1 -0
  438. data/node_modules/browserify/test/wrap/x.js +0 -0
  439. data/node_modules/browserify/testling/README.markdown +29 -0
  440. data/node_modules/browserify/testling/test.sh +37 -0
  441. data/node_modules/browserify/testling/tick.js +9 -0
  442. data/node_modules/browserify/testling/timers.js +50 -0
  443. data/node_modules/browserify/testling/util.js +24 -0
  444. data/node_modules/browserify/v2.markdown +41 -0
  445. data/node_modules/browserify/wrappers/alias.js +1 -0
  446. data/node_modules/browserify/wrappers/body.js +2 -0
  447. data/node_modules/browserify/wrappers/body_debug.js +2 -0
  448. data/node_modules/browserify/wrappers/entry.js +3 -0
  449. data/node_modules/browserify/wrappers/entry_debug.js +3 -0
  450. data/node_modules/browserify/wrappers/package.js +3 -0
  451. data/node_modules/browserify/wrappers/prelude.js +196 -0
  452. data/node_modules/coffee-script/.npmignore +11 -0
  453. data/node_modules/coffee-script/CNAME +1 -0
  454. data/node_modules/coffee-script/CONTRIBUTING.md +9 -0
  455. data/node_modules/coffee-script/LICENSE +22 -0
  456. data/node_modules/coffee-script/README +51 -0
  457. data/node_modules/coffee-script/Rakefile +78 -0
  458. data/node_modules/coffee-script/bin/cake +7 -0
  459. data/node_modules/coffee-script/bin/coffee +7 -0
  460. data/node_modules/coffee-script/extras/jsl.conf +44 -0
  461. data/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
  462. data/node_modules/coffee-script/lib/coffee-script/cake.js +113 -0
  463. data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +171 -0
  464. data/node_modules/coffee-script/lib/coffee-script/command.js +502 -0
  465. data/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
  466. data/node_modules/coffee-script/lib/coffee-script/helpers.js +88 -0
  467. data/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
  468. data/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
  469. data/node_modules/coffee-script/lib/coffee-script/nodes.js +2971 -0
  470. data/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
  471. data/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
  472. data/node_modules/coffee-script/lib/coffee-script/repl.js +276 -0
  473. data/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
  474. data/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
  475. data/node_modules/coffee-script/package.json +50 -0
  476. data/node_modules/jade-runtime/.npmignore +15 -0
  477. data/node_modules/jade-runtime/README.md +8 -0
  478. data/node_modules/jade-runtime/globals.js +32 -0
  479. data/node_modules/jade-runtime/index.js +2 -0
  480. data/node_modules/jade-runtime/jade-runtime.js +181 -0
  481. data/node_modules/jade-runtime/package.json +18 -0
  482. data/node_modules/jade/.npmignore +14 -0
  483. data/node_modules/jade/LICENSE +22 -0
  484. data/node_modules/jade/Readme.md +1299 -0
  485. data/node_modules/jade/bin/jade +168 -0
  486. data/node_modules/jade/index.js +4 -0
  487. data/node_modules/jade/jade.js +3586 -0
  488. data/node_modules/jade/jade.md +510 -0
  489. data/node_modules/jade/jade.min.js +2 -0
  490. data/node_modules/jade/lib/compiler.js +654 -0
  491. data/node_modules/jade/lib/doctypes.js +18 -0
  492. data/node_modules/jade/lib/filters.js +97 -0
  493. data/node_modules/jade/lib/inline-tags.js +28 -0
  494. data/node_modules/jade/lib/jade.js +253 -0
  495. data/node_modules/jade/lib/lexer.js +774 -0
  496. data/node_modules/jade/lib/nodes/attrs.js +77 -0
  497. data/node_modules/jade/lib/nodes/block-comment.js +33 -0
  498. data/node_modules/jade/lib/nodes/block.js +122 -0
  499. data/node_modules/jade/lib/nodes/case.js +43 -0
  500. data/node_modules/jade/lib/nodes/code.js +35 -0
  501. data/node_modules/jade/lib/nodes/comment.js +32 -0
  502. data/node_modules/jade/lib/nodes/doctype.js +29 -0
  503. data/node_modules/jade/lib/nodes/each.js +35 -0
  504. data/node_modules/jade/lib/nodes/filter.js +35 -0
  505. data/node_modules/jade/lib/nodes/index.js +20 -0
  506. data/node_modules/jade/lib/nodes/literal.js +32 -0
  507. data/node_modules/jade/lib/nodes/mixin.js +36 -0
  508. data/node_modules/jade/lib/nodes/node.js +25 -0
  509. data/node_modules/jade/lib/nodes/tag.js +95 -0
  510. data/node_modules/jade/lib/nodes/text.js +36 -0
  511. data/node_modules/jade/lib/parser.js +714 -0
  512. data/node_modules/jade/lib/runtime.js +174 -0
  513. data/node_modules/jade/lib/self-closing.js +19 -0
  514. data/node_modules/jade/lib/utils.js +49 -0
  515. data/node_modules/jade/node_modules/commander/.npmignore +4 -0
  516. data/node_modules/jade/node_modules/commander/.travis.yml +4 -0
  517. data/node_modules/jade/node_modules/commander/History.md +107 -0
  518. data/node_modules/jade/node_modules/commander/Makefile +7 -0
  519. data/node_modules/jade/node_modules/commander/Readme.md +262 -0
  520. data/node_modules/jade/node_modules/commander/index.js +2 -0
  521. data/node_modules/jade/node_modules/commander/lib/commander.js +1026 -0
  522. data/node_modules/jade/node_modules/commander/package.json +39 -0
  523. data/node_modules/jade/node_modules/mkdirp/.npmignore +2 -0
  524. data/node_modules/jade/node_modules/mkdirp/.travis.yml +4 -0
  525. data/node_modules/jade/node_modules/mkdirp/LICENSE +21 -0
  526. data/node_modules/jade/node_modules/mkdirp/README.markdown +61 -0
  527. data/node_modules/jade/node_modules/mkdirp/examples/pow.js +6 -0
  528. data/node_modules/jade/node_modules/mkdirp/index.js +82 -0
  529. data/node_modules/jade/node_modules/mkdirp/package.json +37 -0
  530. data/node_modules/jade/node_modules/mkdirp/test/chmod.js +38 -0
  531. data/node_modules/jade/node_modules/mkdirp/test/clobber.js +37 -0
  532. data/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +28 -0
  533. data/node_modules/jade/node_modules/mkdirp/test/perm.js +32 -0
  534. data/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +39 -0
  535. data/node_modules/jade/node_modules/mkdirp/test/race.js +41 -0
  536. data/node_modules/jade/node_modules/mkdirp/test/rel.js +32 -0
  537. data/node_modules/jade/node_modules/mkdirp/test/return.js +25 -0
  538. data/node_modules/jade/node_modules/mkdirp/test/return_sync.js +24 -0
  539. data/node_modules/jade/node_modules/mkdirp/test/root.js +18 -0
  540. data/node_modules/jade/node_modules/mkdirp/test/sync.js +32 -0
  541. data/node_modules/jade/node_modules/mkdirp/test/umask.js +28 -0
  542. data/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +32 -0
  543. data/node_modules/jade/package.json +53 -0
  544. data/node_modules/jade/runtime.js +179 -0
  545. data/node_modules/jade/runtime.min.js +1 -0
  546. data/node_modules/jade/test.jade +7 -0
  547. data/node_modules/jade/testing/head.jade +5 -0
  548. data/node_modules/jade/testing/index.jade +1 -0
  549. data/node_modules/jade/testing/index.js +14 -0
  550. data/node_modules/jade/testing/layout.jade +10 -0
  551. data/node_modules/jade/testing/user.jade +7 -0
  552. data/node_modules/jade/testing/user.js +27 -0
  553. data/node_modules/optimist/.travis.yml +4 -0
  554. data/node_modules/optimist/LICENSE +21 -0
  555. data/node_modules/optimist/README.markdown +487 -0
  556. data/node_modules/optimist/example/bool.js +10 -0
  557. data/node_modules/optimist/example/boolean_double.js +7 -0
  558. data/node_modules/optimist/example/boolean_single.js +7 -0
  559. data/node_modules/optimist/example/default_hash.js +8 -0
  560. data/node_modules/optimist/example/default_singles.js +7 -0
  561. data/node_modules/optimist/example/divide.js +8 -0
  562. data/node_modules/optimist/example/line_count.js +20 -0
  563. data/node_modules/optimist/example/line_count_options.js +29 -0
  564. data/node_modules/optimist/example/line_count_wrap.js +29 -0
  565. data/node_modules/optimist/example/nonopt.js +4 -0
  566. data/node_modules/optimist/example/reflect.js +2 -0
  567. data/node_modules/optimist/example/short.js +3 -0
  568. data/node_modules/optimist/example/string.js +11 -0
  569. data/node_modules/optimist/example/usage-options.js +19 -0
  570. data/node_modules/optimist/example/xup.js +10 -0
  571. data/node_modules/optimist/index.js +475 -0
  572. data/node_modules/optimist/node_modules/wordwrap/.npmignore +1 -0
  573. data/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
  574. data/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
  575. data/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
  576. data/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
  577. data/node_modules/optimist/node_modules/wordwrap/package.json +45 -0
  578. data/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
  579. data/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
  580. data/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
  581. data/node_modules/optimist/package.json +55 -0
  582. data/node_modules/optimist/test/_.js +71 -0
  583. data/node_modules/optimist/test/_/argv.js +2 -0
  584. data/node_modules/optimist/test/_/bin.js +3 -0
  585. data/node_modules/optimist/test/parse.js +420 -0
  586. data/node_modules/optimist/test/usage.js +292 -0
  587. data/snowball.gemspec +1 -2
  588. metadata +601 -21
  589. data/extconf.rb +0 -9
@@ -0,0 +1,2 @@
1
+ (function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');return mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path))),mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&&reg||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.charAt(0))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i<segs.length;i++){var seg=segs[i];".."==seg?path.pop():"."!=seg&&path.push(seg)}return require(path.join("/"))}},require.register("compiler.js",function(module,exports,require){var nodes=require("./nodes"),filters=require("./filters"),doctypes=require("./doctypes"),selfClosing=require("./self-closing"),runtime=require("./runtime"),utils=require("./utils");Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")});var Compiler=module.exports=function Compiler(node,options){this.options=options=options||{},this.node=node,this.hasCompiledDoctype=!1,this.hasCompiledTag=!1,this.pp=options.pretty||!1,this.debug=!1!==options.compileDebug,this.indents=0,this.parentIndents=0,options.doctype&&this.setDoctype(options.doctype)};Compiler.prototype={compile:function(){return this.buf=["var interp;"],this.pp&&this.buf.push("var __indent = [];"),this.lastBufferedIdx=-1,this.visit(this.node),this.buf.join("\n")},setDoctype:function(name){var doctype=doctypes[(name||"default").toLowerCase()];doctype=doctype||"<!DOCTYPE "+name+">",this.doctype=doctype,this.terse="5"==name||"html"==name,this.xml=0==this.doctype.indexOf("<?xml")},buffer:function(str,esc){esc&&(str=utils.escape(str)),this.lastBufferedIdx==this.buf.length?(this.lastBuffered+=str,this.buf[this.lastBufferedIdx-1]="buf.push('"+this.lastBuffered+"');"):(this.buf.push("buf.push('"+str+"');"),this.lastBuffered=str,this.lastBufferedIdx=this.buf.length)},prettyIndent:function(offset,newline){offset=offset||0,newline=newline?"\\n":"",this.buffer(newline+Array(this.indents+offset).join(" ")),this.parentIndents&&this.buf.push("buf.push.apply(buf, __indent);")},visit:function(node){var debug=this.debug;debug&&this.buf.push("__jade.unshift({ lineno: "+node.line+", filename: "+(node.filename?JSON.stringify(node.filename):"__jade[0].filename")+" });"),!1===node.debug&&this.debug&&(this.buf.pop(),this.buf.pop()),this.visitNode(node),debug&&this.buf.push("__jade.shift();")},visitNode:function(node){var name=node.constructor.name||node.constructor.toString().match(/function ([^(\s]+)()/)[1];return this["visit"+name](node)},visitCase:function(node){var _=this.withinCase;this.withinCase=!0,this.buf.push("switch ("+node.expr+"){"),this.visit(node.block),this.buf.push("}"),this.withinCase=_},visitWhen:function(node){"default"==node.expr?this.buf.push("default:"):this.buf.push("case "+node.expr+":"),this.visit(node.block),this.buf.push(" break;")},visitLiteral:function(node){var str=node.str.replace(/\n/g,"\\\\n");this.buffer(str)},visitBlock:function(block){var len=block.nodes.length,escape=this.escape,pp=this.pp;if(this.parentIndents&&block.mode){pp&&this.buf.push("__indent.push('"+Array(this.indents+1).join(" ")+"');"),this.buf.push("block && block();"),pp&&this.buf.push("__indent.pop();");return}pp&&len>1&&!escape&&block.nodes[0].isText&&block.nodes[1].isText&&this.prettyIndent(1,!0);for(var i=0;i<len;++i)pp&&i>0&&!escape&&block.nodes[i].isText&&block.nodes[i-1].isText&&this.prettyIndent(1,!1),this.visit(block.nodes[i]),block.nodes[i+1]&&block.nodes[i].isText&&block.nodes[i+1].isText&&this.buffer("\\n")},visitDoctype:function(doctype){doctype&&(doctype.val||!this.doctype)&&this.setDoctype(doctype.val||"default"),this.doctype&&this.buffer(this.doctype),this.hasCompiledDoctype=!0},visitMixin:function(mixin){var name=mixin.name.replace(/-/g,"_")+"_mixin",args=mixin.args||"",block=mixin.block,attrs=mixin.attrs,pp=this.pp;if(mixin.call){pp&&this.buf.push("__indent.push('"+Array(this.indents+1).join(" ")+"');");if(block||attrs.length){this.buf.push(name+".call({");if(block){this.buf.push("block: function(){"),this.parentIndents++;var _indents=this.indents;this.indents=0,this.visit(mixin.block),this.indents=_indents,this.parentIndents--,attrs.length?this.buf.push("},"):this.buf.push("}")}if(attrs.length){var val=this.attrs(attrs);val.inherits?this.buf.push("attributes: merge({"+val.buf+"}, attributes), escaped: merge("+val.escaped+", escaped, true)"):this.buf.push("attributes: {"+val.buf+"}, escaped: "+val.escaped)}args?this.buf.push("}, "+args+");"):this.buf.push("});")}else this.buf.push(name+"("+args+");");pp&&this.buf.push("__indent.pop();")}else this.buf.push("var "+name+" = function("+args+"){"),this.buf.push("var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};"),this.parentIndents++,this.visit(block),this.parentIndents--,this.buf.push("};")},visitTag:function(tag){this.indents++;var name=tag.name,pp=this.pp;tag.buffer&&(name="' + ("+name+") + '"),this.hasCompiledTag||(!this.hasCompiledDoctype&&"html"==name&&this.visitDoctype(),this.hasCompiledTag=!0),pp&&!tag.isInline()&&this.prettyIndent(0,!0),(~selfClosing.indexOf(name)||tag.selfClosing)&&!this.xml?(this.buffer("<"+name),this.visitAttributes(tag.attrs),this.terse?this.buffer(">"):this.buffer("/>")):(tag.attrs.length?(this.buffer("<"+name),tag.attrs.length&&this.visitAttributes(tag.attrs),this.buffer(">")):this.buffer("<"+name+">"),tag.code&&this.visitCode(tag.code),this.escape="pre"==tag.name,this.visit(tag.block),pp&&!tag.isInline()&&"pre"!=tag.name&&!tag.canInline()&&this.prettyIndent(0,!0),this.buffer("</"+name+">")),this.indents--},visitFilter:function(filter){var fn=filters[filter.name];if(!fn)throw filter.isASTFilter?new Error('unknown ast filter "'+filter.name+':"'):new Error('unknown filter ":'+filter.name+'"');if(filter.isASTFilter)this.buf.push(fn(filter.block,this,filter.attrs));else{var text=filter.block.nodes.map(function(node){return node.val}).join("\n");filter.attrs=filter.attrs||{},filter.attrs.filename=this.options.filename,this.buffer(utils.text(fn(text,filter.attrs)))}},visitText:function(text){text=utils.text(text.val.replace(/\\/g,"\\\\")),this.escape&&(text=escape(text)),this.buffer(text)},visitComment:function(comment){if(!comment.buffer)return;this.pp&&this.prettyIndent(1,!0),this.buffer("<!--"+utils.escape(comment.val)+"-->")},visitBlockComment:function(comment){if(!comment.buffer)return;0==comment.val.trim().indexOf("if")?(this.buffer("<!--["+comment.val.trim()+"]>"),this.visit(comment.block),this.buffer("<![endif]-->")):(this.buffer("<!--"+comment.val),this.visit(comment.block),this.buffer("-->"))},visitCode:function(code){if(code.buffer){var val=code.val.trimLeft();this.buf.push("var __val__ = "+val),val='null == __val__ ? "" : __val__',code.escape&&(val="escape("+val+")"),this.buf.push("buf.push("+val+");")}else this.buf.push(code.val);code.block&&(code.buffer||this.buf.push("{"),this.visit(code.block),code.buffer||this.buf.push("}"))},visitEach:function(each){this.buf.push("// iterate "+each.obj+"\n"+";(function(){\n"+" if ('number' == typeof "+each.obj+".length) {\n"+" for (var "+each.key+" = 0, $$l = "+each.obj+".length; "+each.key+" < $$l; "+each.key+"++) {\n"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n } else {\n for (var "+each.key+" in "+each.obj+") {\n"+" if ("+each.obj+".hasOwnProperty("+each.key+")){"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n"),this.buf.push(" }\n }\n}).call(this);\n")},visitAttributes:function(attrs){var val=this.attrs(attrs);val.inherits?this.buf.push("buf.push(attrs(merge({ "+val.buf+" }, attributes), merge("+val.escaped+", escaped, true)));"):val.constant?(eval("var buf={"+val.buf+"};"),this.buffer(runtime.attrs(buf,JSON.parse(val.escaped)),!0)):this.buf.push("buf.push(attrs({ "+val.buf+" }, "+val.escaped+"));")},attrs:function(attrs){var buf=[],classes=[],escaped={},constant=attrs.every(function(attr){return isConstant(attr.val)}),inherits=!1;return this.terse&&buf.push("terse: true"),attrs.forEach(function(attr){if(attr.name=="attributes")return inherits=!0;escaped[attr.name]=attr.escaped;if(attr.name=="class")classes.push("("+attr.val+")");else{var pair="'"+attr.name+"':("+attr.val+")";buf.push(pair)}}),classes.length&&(classes=classes.join(" + ' ' + "),buf.push("class: "+classes)),{buf:buf.join(", ").replace("class:",'"class":'),escaped:JSON.stringify(escaped),inherits:inherits,constant:constant}}};function isConstant(val){if(/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))return!0;if(!isNaN(Number(val)))return!0;var matches;return(matches=/^ *\[(.*)\] *$/.exec(val))?matches[1].split(",").every(isConstant):!1}function escape(html){return String(html).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}),require.register("doctypes.js",function(module,exports,require){module.exports={5:"<!DOCTYPE html>","default":"<!DOCTYPE html>",xml:'<?xml version="1.0" encoding="utf-8" ?>',transitional:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',strict:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',frameset:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',1.1:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',basic:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',mobile:'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">'}}),require.register("filters.js",function(module,exports,require){module.exports={cdata:function(str){return"<![CDATA[\\n"+str+"\\n]]>"},sass:function(str){str=str.replace(/\\n/g,"\n");var sass=require("sass").render(str).replace(/\n/g,"\\n");return'<style type="text/css">'+sass+"</style>"},stylus:function(str,options){var ret;str=str.replace(/\\n/g,"\n");var stylus=require("stylus");return stylus(str,options).render(function(err,css){if(err)throw err;ret=css.replace(/\n/g,"\\n")}),'<style type="text/css">'+ret+"</style>"},less:function(str){var ret;return str=str.replace(/\\n/g,"\n"),require("less").render(str,function(err,css){if(err)throw err;ret='<style type="text/css">'+css.replace(/\n/g,"\\n")+"</style>"}),ret},markdown:function(str){var md;try{md=require("markdown")}catch(err){try{md=require("discount")}catch(err){try{md=require("markdown-js")}catch(err){try{md=require("marked")}catch(err){throw new Error("Cannot find markdown library, install markdown, discount, or marked.")}}}}return str=str.replace(/\\n/g,"\n"),md.parse(str).replace(/\n/g,"\\n").replace(/'/g,"&#39;")},coffeescript:function(str){str=str.replace(/\\n/g,"\n");var js=require("coffee-script").compile(str).replace(/\\/g,"\\\\").replace(/\n/g,"\\n");return'<script type="text/javascript">\\n'+js+"</script>"}}}),require.register("inline-tags.js",function(module,exports,require){module.exports=["a","abbr","acronym","b","br","code","em","font","i","img","ins","kbd","map","samp","small","span","strong","sub","sup"]}),require.register("jade.js",function(module,exports,require){var Parser=require("./parser"),Lexer=require("./lexer"),Compiler=require("./compiler"),runtime=require("./runtime");exports.version="0.26.1",exports.selfClosing=require("./self-closing"),exports.doctypes=require("./doctypes"),exports.filters=require("./filters"),exports.utils=require("./utils"),exports.Compiler=Compiler,exports.Parser=Parser,exports.Lexer=Lexer,exports.nodes=require("./nodes"),exports.runtime=runtime,exports.cache={};function parse(str,options){try{var parser=new Parser(str,options.filename,options),compiler=new(options.compiler||Compiler)(parser.parse(),options),js=compiler.compile();return options.debug&&console.error("\nCompiled Function:\n\n%s",js.replace(/^/gm," ")),"var buf = [];\n"+(options.self?"var self = locals || {};\n"+js:"with (locals || {}) {\n"+js+"\n}\n")+'return buf.join("");'}catch(err){parser=parser.context(),runtime.rethrow(err,parser.filename,parser.lexer.lineno)}}exports.compile=function(str,options){var options=options||{},client=options.client,filename=options.filename?JSON.stringify(options.filename):"undefined",fn;return options.compileDebug!==!1?fn=["var __jade = [{ lineno: 1, filename: "+filename+" }];","try {",parse(String(str),options),"} catch (err) {"," rethrow(err, __jade[0].filename, __jade[0].lineno);","}"].join("\n"):fn=parse(String(str),options),client&&(fn="attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n"+fn),fn=new Function("locals, attrs, escape, rethrow, merge",fn),client?fn:function(locals){return fn(locals,runtime.attrs,runtime.escape,runtime.rethrow,runtime.merge)}},exports.render=function(str,options,fn){"function"==typeof options&&(fn=options,options={});if(options.cache&&!options.filename)return fn(new Error('the "filename" option is required for caching'));try{var path=options.filename,tmpl=options.cache?exports.cache[path]||(exports.cache[path]=exports.compile(str,options)):exports.compile(str,options);fn(null,tmpl(options))}catch(err){fn(err)}},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={});try{options.filename=path;var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");exports.render(str,options,fn)}catch(err){fn(err)}},exports.__express=exports.renderFile}),require.register("lexer.js",function(module,exports,require){var Lexer=module.exports=function Lexer(str,options){options=options||{},this.input=str.replace(/\r\n|\r/g,"\n"),this.colons=options.colons,this.deferredTokens=[],this.lastIndents=0,this.lineno=1,this.stash=[],this.indentStack=[],this.indentRe=null,this.pipeless=!1};Lexer.prototype={tok:function(type,val){return{type:type,line:this.lineno,val:val}},consume:function(len){this.input=this.input.substr(len)},scan:function(regexp,type){var captures;if(captures=regexp.exec(this.input))return this.consume(captures[0].length),this.tok(type,captures[1])},defer:function(tok){this.deferredTokens.push(tok)},lookahead:function(n){var fetch=n-this.stash.length;while(fetch-->0)this.stash.push(this.next());return this.stash[--n]},indexOfDelimiters:function(start,end){var str=this.input,nstart=0,nend=0,pos=0;for(var i=0,len=str.length;i<len;++i)if(start==str.charAt(i))++nstart;else if(end==str.charAt(i)&&++nend==nstart){pos=i;break}return pos},stashed:function(){return this.stash.length&&this.stash.shift()},deferred:function(){return this.deferredTokens.length&&this.deferredTokens.shift()},eos:function(){if(this.input.length)return;return this.indentStack.length?(this.indentStack.shift(),this.tok("outdent")):this.tok("eos")},blank:function(){var captures;if(captures=/^\n *\n/.exec(this.input))return this.consume(captures[0].length-1),this.pipeless?this.tok("text",""):this.next()},comment:function(){var captures;if(captures=/^ *\/\/(-)?([^\n]*)/.exec(this.input)){this.consume(captures[0].length);var tok=this.tok("comment",captures[2]);return tok.buffer="-"!=captures[1],tok}},interpolation:function(){var captures;if(captures=/^#\{(.*?)\}/.exec(this.input))return this.consume(captures[0].length),this.tok("interpolation",captures[1])},tag:function(){var captures;if(captures=/^(\w[-:\w]*)(\/?)/.exec(this.input)){this.consume(captures[0].length);var tok,name=captures[1];if(":"==name[name.length-1]){name=name.slice(0,-1),tok=this.tok("tag",name),this.defer(this.tok(":"));while(" "==this.input[0])this.input=this.input.substr(1)}else tok=this.tok("tag",name);return tok.selfClosing=!!captures[2],tok}},filter:function(){return this.scan(/^:(\w+)/,"filter")},doctype:function(){return this.scan(/^(?:!!!|doctype) *([^\n]+)?/,"doctype")},id:function(){return this.scan(/^#([\w-]+)/,"id")},className:function(){return this.scan(/^\.([\w-]+)/,"class")},text:function(){return this.scan(/^(?:\| ?| ?)?([^\n]+)/,"text")},"extends":function(){return this.scan(/^extends? +([^\n]+)/,"extends")},prepend:function(){var captures;if(captures=/^prepend +([^\n]+)/.exec(this.input)){this.consume(captures[0].length);var mode="prepend",name=captures[1],tok=this.tok("block",name);return tok.mode=mode,tok}},append:function(){var captures;if(captures=/^append +([^\n]+)/.exec(this.input)){this.consume(captures[0].length);var mode="append",name=captures[1],tok=this.tok("block",name);return tok.mode=mode,tok}},block:function(){var captures;if(captures=/^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)){this.consume(captures[0].length);var mode=captures[1]||"replace",name=captures[2],tok=this.tok("block",name);return tok.mode=mode,tok}},yield:function(){return this.scan(/^yield */,"yield")},include:function(){return this.scan(/^include +([^\n]+)/,"include")},"case":function(){return this.scan(/^case +([^\n]+)/,"case")},when:function(){return this.scan(/^when +([^:\n]+)/,"when")},"default":function(){return this.scan(/^default */,"default")},assignment:function(){var captures;if(captures=/^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)){this.consume(captures[0].length);var name=captures[1],val=captures[2];return this.tok("code","var "+name+" = ("+val+");")}},call:function(){var captures;if(captures=/^\+([-\w]+)/.exec(this.input)){this.consume(captures[0].length);var tok=this.tok("call",captures[1]);if(captures=/^ *\((.*?)\)/.exec(this.input))/^ *[-\w]+ *=/.test(captures[1])||(this.consume(captures[0].length),tok.args=captures[1]);return tok}},mixin:function(){var captures;if(captures=/^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)){this.consume(captures[0].length);var tok=this.tok("mixin",captures[1]);return tok.args=captures[2],tok}},conditional:function(){var captures;if(captures=/^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)){this.consume(captures[0].length);var type=captures[1],js=captures[2];switch(type){case"if":js="if ("+js+")";break;case"unless":js="if (!("+js+"))";break;case"else if":js="else if ("+js+")";break;case"else":js="else"}return this.tok("code",js)}},"while":function(){var captures;if(captures=/^while +([^\n]+)/.exec(this.input))return this.consume(captures[0].length),this.tok("code","while ("+captures[1]+")")},each:function(){var captures;if(captures=/^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)){this.consume(captures[0].length);var tok=this.tok("each",captures[1]);return tok.key=captures[2]||"$index",tok.code=captures[3],tok}},code:function(){var captures;if(captures=/^(!?=|-)([^\n]+)/.exec(this.input)){this.consume(captures[0].length);var flags=captures[1];captures[1]=captures[2];var tok=this.tok("code",captures[1]);return tok.escape=flags[0]==="=",tok.buffer=flags[0]==="="||flags[1]==="=",tok}},attrs:function(){if("("==this.input.charAt(0)){var index=this.indexOfDelimiters("(",")"),str=this.input.substr(1,index-1),tok=this.tok("attrs"),len=str.length,colons=this.colons,states=["key"],escapedAttr,key="",val="",quote,c,p;function state(){return states[states.length-1]}function interpolate(attr){return attr.replace(/#\{([^}]+)\}/g,function(_,expr){return quote+" + ("+expr+") + "+quote})}this.consume(index+1),tok.attrs={},tok.escaped={};function parse(c){var real=c;colons&&":"==c&&(c="=");switch(c){case",":case"\n":switch(state()){case"expr":case"array":case"string":case"object":val+=c;break;default:states.push("key"),val=val.trim(),key=key.trim();if(""==key)return;key=key.replace(/^['"]|['"]$/g,"").replace("!",""),tok.escaped[key]=escapedAttr,tok.attrs[key]=""==val?!0:interpolate(val),key=val=""}break;case"=":switch(state()){case"key char":key+=real;break;case"val":case"expr":case"array":case"string":case"object":val+=real;break;default:escapedAttr="!"!=p,states.push("val")}break;case"(":("val"==state()||"expr"==state())&&states.push("expr"),val+=c;break;case")":("expr"==state()||"val"==state())&&states.pop(),val+=c;break;case"{":"val"==state()&&states.push("object"),val+=c;break;case"}":"object"==state()&&states.pop(),val+=c;break;case"[":"val"==state()&&states.push("array"),val+=c;break;case"]":"array"==state()&&states.pop(),val+=c;break;case'"':case"'":switch(state()){case"key":states.push("key char");break;case"key char":states.pop();break;case"string":c==quote&&states.pop(),val+=c;break;default:states.push("string"),val+=c,quote=c}break;case"":break;default:switch(state()){case"key":case"key char":key+=c;break;default:val+=c}}p=c}for(var i=0;i<len;++i)parse(str.charAt(i));return parse(","),"/"==this.input.charAt(0)&&(this.consume(1),tok.selfClosing=!0),tok}},indent:function(){var captures,re;this.indentRe?captures=this.indentRe.exec(this.input):(re=/^\n(\t*) */,captures=re.exec(this.input),captures&&!captures[1].length&&(re=/^\n( *)/,captures=re.exec(this.input)),captures&&captures[1].length&&(this.indentRe=re));if(captures){var tok,indents=captures[1].length;++this.lineno,this.consume(indents+1);if(" "==this.input[0]||"\t"==this.input[0])throw new Error("Invalid indentation, you can use tabs or spaces but not both");if("\n"==this.input[0])return this.tok("newline");if(this.indentStack.length&&indents<this.indentStack[0]){while(this.indentStack.length&&this.indentStack[0]>indents)this.stash.push(this.tok("outdent")),this.indentStack.shift();tok=this.stash.pop()}else indents&&indents!=this.indentStack[0]?(this.indentStack.unshift(indents),tok=this.tok("indent",indents)):tok=this.tok("newline");return tok}},pipelessText:function(){if(this.pipeless){if("\n"==this.input[0])return;var i=this.input.indexOf("\n");-1==i&&(i=this.input.length);var str=this.input.substr(0,i);return this.consume(str.length),this.tok("text",str)}},colon:function(){return this.scan(/^: */,":")},advance:function(){return this.stashed()||this.next()},next:function(){return this.deferred()||this.blank()||this.eos()||this.pipelessText()||this.yield()||this.doctype()||this.interpolation()||this["case"]()||this.when()||this["default"]()||this["extends"]()||this.append()||this.prepend()||this.block()||this.include()||this.mixin()||this.call()||this.conditional()||this.each()||this["while"]()||this.assignment()||this.tag()||this.filter()||this.code()||this.id()||this.className()||this.attrs()||this.indent()||this.comment()||this.colon()||this.text()}}}),require.register("nodes/attrs.js",function(module,exports,require){var Node=require("./node"),Block=require("./block"),Attrs=module.exports=function Attrs(){this.attrs=[]};Attrs.prototype=new Node,Attrs.prototype.constructor=Attrs,Attrs.prototype.setAttribute=function(name,val,escaped){return this.attrs.push({name:name,val:val,escaped:escaped}),this},Attrs.prototype.removeAttribute=function(name){for(var i=0,len=this.attrs.length;i<len;++i)this.attrs[i]&&this.attrs[i].name==name&&delete this.attrs[i]},Attrs.prototype.getAttribute=function(name){for(var i=0,len=this.attrs.length;i<len;++i)if(this.attrs[i]&&this.attrs[i].name==name)return this.attrs[i].val}}),require.register("nodes/block-comment.js",function(module,exports,require){var Node=require("./node"),BlockComment=module.exports=function BlockComment(val,block,buffer){this.block=block,this.val=val,this.buffer=buffer};BlockComment.prototype=new Node,BlockComment.prototype.constructor=BlockComment}),require.register("nodes/block.js",function(module,exports,require){var Node=require("./node"),Block=module.exports=function Block(node){this.nodes=[],node&&this.push(node)};Block.prototype=new Node,Block.prototype.constructor=Block,Block.prototype.isBlock=!0,Block.prototype.replace=function(other){other.nodes=this.nodes},Block.prototype.push=function(node){return this.nodes.push(node)},Block.prototype.isEmpty=function(){return 0==this.nodes.length},Block.prototype.unshift=function(node){return this.nodes.unshift(node)},Block.prototype.includeBlock=function(){var ret=this,node;for(var i=0,len=this.nodes.length;i<len;++i){node=this.nodes[i];if(node.yield)return node;if(node.textOnly)continue;node.includeBlock?ret=node.includeBlock():node.block&&!node.block.isEmpty()&&(ret=node.block.includeBlock())}return ret},Block.prototype.clone=function(){var clone=new Block;for(var i=0,len=this.nodes.length;i<len;++i)clone.push(this.nodes[i].clone());return clone}}),require.register("nodes/case.js",function(module,exports,require){var Node=require("./node"),Case=exports=module.exports=function Case(expr,block){this.expr=expr,this.block=block};Case.prototype=new Node,Case.prototype.constructor=Case;var When=exports.When=function When(expr,block){this.expr=expr,this.block=block,this.debug=!1};When.prototype=new Node,When.prototype.constructor=When}),require.register("nodes/code.js",function(module,exports,require){var Node=require("./node"),Code=module.exports=function Code(val,buffer,escape){this.val=val,this.buffer=buffer,this.escape=escape,val.match(/^ *else/)&&(this.debug=!1)};Code.prototype=new Node,Code.prototype.constructor=Code}),require.register("nodes/comment.js",function(module,exports,require){var Node=require("./node"),Comment=module.exports=function Comment(val,buffer){this.val=val,this.buffer=buffer};Comment.prototype=new Node,Comment.prototype.constructor=Comment}),require.register("nodes/doctype.js",function(module,exports,require){var Node=require("./node"),Doctype=module.exports=function Doctype(val){this.val=val};Doctype.prototype=new Node,Doctype.prototype.constructor=Doctype}),require.register("nodes/each.js",function(module,exports,require){var Node=require("./node"),Each=module.exports=function Each(obj,val,key,block){this.obj=obj,this.val=val,this.key=key,this.block=block};Each.prototype=new Node,Each.prototype.constructor=Each}),require.register("nodes/filter.js",function(module,exports,require){var Node=require("./node"),Block=require("./block"),Filter=module.exports=function Filter(name,block,attrs){this.name=name,this.block=block,this.attrs=attrs,this.isASTFilter=!block.nodes.every(function(node){return node.isText})};Filter.prototype=new Node,Filter.prototype.constructor=Filter}),require.register("nodes/index.js",function(module,exports,require){exports.Node=require("./node"),exports.Tag=require("./tag"),exports.Code=require("./code"),exports.Each=require("./each"),exports.Case=require("./case"),exports.Text=require("./text"),exports.Block=require("./block"),exports.Mixin=require("./mixin"),exports.Filter=require("./filter"),exports.Comment=require("./comment"),exports.Literal=require("./literal"),exports.BlockComment=require("./block-comment"),exports.Doctype=require("./doctype")}),require.register("nodes/literal.js",function(module,exports,require){var Node=require("./node"),Literal=module.exports=function Literal(str){this.str=str.replace(/\\/g,"\\\\").replace(/\n|\r\n/g,"\\n").replace(/'/g,"\\'")};Literal.prototype=new Node,Literal.prototype.constructor=Literal}),require.register("nodes/mixin.js",function(module,exports,require){var Attrs=require("./attrs"),Mixin=module.exports=function Mixin(name,args,block,call){this.name=name,this.args=args,this.block=block,this.attrs=[],this.call=call};Mixin.prototype=new Attrs,Mixin.prototype.constructor=Mixin}),require.register("nodes/node.js",function(module,exports,require){var Node=module.exports=function Node(){};Node.prototype.clone=function(){return this}}),require.register("nodes/tag.js",function(module,exports,require){var Attrs=require("./attrs"),Block=require("./block"),inlineTags=require("../inline-tags"),Tag=module.exports=function Tag(name,block){this.name=name,this.attrs=[],this.block=block||new Block};Tag.prototype=new Attrs,Tag.prototype.constructor=Tag,Tag.prototype.clone=function(){var clone=new Tag(this.name,this.block.clone());return clone.line=this.line,clone.attrs=this.attrs,clone.textOnly=this.textOnly,clone},Tag.prototype.isInline=function(){return~inlineTags.indexOf(this.name)},Tag.prototype.canInline=function(){var nodes=this.block.nodes;function isInline(node){return node.isBlock?node.nodes.every(isInline):node.isText||node.isInline&&node.isInline()}if(!nodes.length)return!0;if(1==nodes.length)return isInline(nodes[0]);if(this.block.nodes.every(isInline)){for(var i=1,len=nodes.length;i<len;++i)if(nodes[i-1].isText&&nodes[i].isText)return!1;return!0}return!1}}),require.register("nodes/text.js",function(module,exports,require){var Node=require("./node"),Text=module.exports=function Text(line){this.val="","string"==typeof line&&(this.val=line)};Text.prototype=new Node,Text.prototype.constructor=Text,Text.prototype.isText=!0}),require.register("parser.js",function(module,exports,require){var Lexer=require("./lexer"),nodes=require("./nodes"),Parser=exports=module.exports=function Parser(str,filename,options){this.input=str,this.lexer=new Lexer(str,options),this.filename=filename,this.blocks={},this.mixins={},this.options=options,this.contexts=[this]},textOnly=exports.textOnly=["script","style"];Parser.prototype={context:function(parser){if(!parser)return this.contexts.pop();this.contexts.push(parser)},advance:function(){return this.lexer.advance()},skip:function(n){while(n--)this.advance()},peek:function(){return this.lookahead(1)},line:function(){return this.lexer.lineno},lookahead:function(n){return this.lexer.lookahead(n)},parse:function(){var block=new nodes.Block,parser;block.line=this.line();while("eos"!=this.peek().type)"newline"==this.peek().type?this.advance():block.push(this.parseExpr());if(parser=this.extending){this.context(parser);var ast=parser.parse();this.context();for(var name in this.mixins)ast.unshift(this.mixins[name]);return ast}return block},expect:function(type){if(this.peek().type===type)return this.advance();throw new Error('expected "'+type+'", but got "'+this.peek().type+'"')},accept:function(type){if(this.peek().type===type)return this.advance()},parseExpr:function(){switch(this.peek().type){case"tag":return this.parseTag();case"mixin":return this.parseMixin();case"block":return this.parseBlock();case"case":return this.parseCase();case"when":return this.parseWhen();case"default":return this.parseDefault();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"doctype":return this.parseDoctype();case"filter":return this.parseFilter();case"comment":return this.parseComment();case"text":return this.parseText();case"each":return this.parseEach();case"code":return this.parseCode();case"call":return this.parseCall();case"interpolation":return this.parseInterpolation();case"yield":this.advance();var block=new nodes.Block;return block.yield=!0,block;case"id":case"class":var tok=this.advance();return this.lexer.defer(this.lexer.tok("tag","div")),this.lexer.defer(tok),this.parseExpr();default:throw new Error('unexpected token "'+this.peek().type+'"')}},parseText:function(){var tok=this.expect("text"),node=new nodes.Text(tok.val);return node.line=this.line(),node},parseBlockExpansion:function(){return":"==this.peek().type?(this.advance(),new nodes.Block(this.parseExpr())):this.block()},parseCase:function(){var val=this.expect("case").val,node=new nodes.Case(val);return node.line=this.line(),node.block=this.block(),node},parseWhen:function(){var val=this.expect("when").val;return new nodes.Case.When(val,this.parseBlockExpansion())},parseDefault:function(){return this.expect("default"),new nodes.Case.When("default",this.parseBlockExpansion())},parseCode:function(){var tok=this.expect("code"),node=new nodes.Code(tok.val,tok.buffer,tok.escape),block,i=1;node.line=this.line();while(this.lookahead(i)&&"newline"==this.lookahead(i).type)++i;return block="indent"==this.lookahead(i).type,block&&(this.skip(i-1),node.block=this.block()),node},parseComment:function(){var tok=this.expect("comment"),node;return"indent"==this.peek().type?node=new nodes.BlockComment(tok.val,this.block(),tok.buffer):node=new nodes.Comment(tok.val,tok.buffer),node.line=this.line(),node},parseDoctype:function(){var tok=this.expect("doctype"),node=new nodes.Doctype(tok.val);return node.line=this.line(),node},parseFilter:function(){var block,tok=this.expect("filter"),attrs=this.accept("attrs");this.lexer.pipeless=!0,block=this.parseTextBlock(),this.lexer.pipeless=!1;var node=new nodes.Filter(tok.val,block,attrs&&attrs.attrs);return node
2
+ .line=this.line(),node},parseASTFilter:function(){var block,tok=this.expect("tag"),attrs=this.accept("attrs");this.expect(":"),block=this.block();var node=new nodes.Filter(tok.val,block,attrs&&attrs.attrs);return node.line=this.line(),node},parseEach:function(){var tok=this.expect("each"),node=new nodes.Each(tok.code,tok.val,tok.key);return node.line=this.line(),node.block=this.block(),node},parseExtends:function(){var path=require("path"),fs=require("fs"),dirname=path.dirname,basename=path.basename,join=path.join;if(!this.filename)throw new Error('the "filename" option is required to extend templates');var path=this.expect("extends").val.trim(),dir=dirname(this.filename),path=join(dir,path+".jade"),str=fs.readFileSync(path,"utf8"),parser=new Parser(str,path,this.options);return parser.blocks=this.blocks,parser.contexts=this.contexts,this.extending=parser,new nodes.Literal("")},parseBlock:function(){var block=this.expect("block"),mode=block.mode,name=block.val.trim();block="indent"==this.peek().type?this.block():new nodes.Block(new nodes.Literal(""));var prev=this.blocks[name];if(prev)switch(prev.mode){case"append":block.nodes=block.nodes.concat(prev.nodes),prev=block;break;case"prepend":block.nodes=prev.nodes.concat(block.nodes),prev=block}return block.mode=mode,this.blocks[name]=prev||block},parseInclude:function(){var path=require("path"),fs=require("fs"),dirname=path.dirname,basename=path.basename,join=path.join,path=this.expect("include").val.trim(),dir=dirname(this.filename);if(!this.filename)throw new Error('the "filename" option is required to use includes');~basename(path).indexOf(".")||(path+=".jade");if(".jade"!=path.substr(-5)){var path=join(dir,path),str=fs.readFileSync(path,"utf8");return new nodes.Literal(str)}var path=join(dir,path),str=fs.readFileSync(path,"utf8"),parser=new Parser(str,path,this.options);parser.blocks=this.blocks,parser.mixins=this.mixins,this.context(parser);var ast=parser.parse();return this.context(),ast.filename=path,"indent"==this.peek().type&&ast.includeBlock().push(this.block()),ast},parseCall:function(){var tok=this.expect("call"),name=tok.val,args=tok.args,mixin=new nodes.Mixin(name,args,new nodes.Block,!0);return this.tag(mixin),mixin.block.isEmpty()&&(mixin.block=null),mixin},parseMixin:function(){var tok=this.expect("mixin"),name=tok.val,args=tok.args,mixin;return"indent"==this.peek().type?(mixin=new nodes.Mixin(name,args,this.block(),!1),this.mixins[name]=mixin,mixin):new nodes.Mixin(name,args,null,!0)},parseTextBlock:function(){var block=new nodes.Block;block.line=this.line();var spaces=this.expect("indent").val;null==this._spaces&&(this._spaces=spaces);var indent=Array(spaces-this._spaces+1).join(" ");while("outdent"!=this.peek().type)switch(this.peek().type){case"newline":this.advance();break;case"indent":this.parseTextBlock().nodes.forEach(function(node){block.push(node)});break;default:var text=new nodes.Text(indent+this.advance().val);text.line=this.line(),block.push(text)}return spaces==this._spaces&&(this._spaces=null),this.expect("outdent"),block},block:function(){var block=new nodes.Block;block.line=this.line(),this.expect("indent");while("outdent"!=this.peek().type)"newline"==this.peek().type?this.advance():block.push(this.parseExpr());return this.expect("outdent"),block},parseInterpolation:function(){var tok=this.advance(),tag=new nodes.Tag(tok.val);return tag.buffer=!0,this.tag(tag)},parseTag:function(){var i=2;"attrs"==this.lookahead(i).type&&++i;if(":"==this.lookahead(i).type&&"indent"==this.lookahead(++i).type)return this.parseASTFilter();var tok=this.advance(),tag=new nodes.Tag(tok.val);return tag.selfClosing=tok.selfClosing,this.tag(tag)},tag:function(tag){var dot;tag.line=this.line();out:for(;;)switch(this.peek().type){case"id":case"class":var tok=this.advance();tag.setAttribute(tok.type,"'"+tok.val+"'");continue;case"attrs":var tok=this.advance(),obj=tok.attrs,escaped=tok.escaped,names=Object.keys(obj);tok.selfClosing&&(tag.selfClosing=!0);for(var i=0,len=names.length;i<len;++i){var name=names[i],val=obj[name];tag.setAttribute(name,val,escaped[name])}continue;default:break out}"."==this.peek().val&&(dot=tag.textOnly=!0,this.advance());switch(this.peek().type){case"text":tag.block.push(this.parseText());break;case"code":tag.code=this.parseCode();break;case":":this.advance(),tag.block=new nodes.Block,tag.block.push(this.parseExpr())}while("newline"==this.peek().type)this.advance();tag.textOnly=tag.textOnly||~textOnly.indexOf(tag.name);if("script"==tag.name){var type=tag.getAttribute("type");!dot&&type&&"text/javascript"!=type.replace(/^['"]|['"]$/g,"")&&(tag.textOnly=!1)}if("indent"==this.peek().type)if(tag.textOnly)this.lexer.pipeless=!0,tag.block=this.parseTextBlock(),this.lexer.pipeless=!1;else{var block=this.block();if(tag.block)for(var i=0,len=block.nodes.length;i<len;++i)tag.block.push(block.nodes[i]);else tag.block=block}return tag}}}),require.register("runtime.js",function(module,exports,require){Array.isArray||(Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}),Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),exports.merge=function merge(a,b){var ac=a["class"],bc=b["class"];if(ac||bc)ac=ac||[],bc=bc||[],Array.isArray(ac)||(ac=[ac]),Array.isArray(bc)||(bc=[bc]),ac=ac.filter(nulls),bc=bc.filter(nulls),a["class"]=ac.concat(bc).join(" ");for(var key in b)key!="class"&&(a[key]=b[key]);return a};function nulls(val){return val!=null}exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i<len;++i){var key=keys[i],val=obj[key];"boolean"==typeof val||null==val?val&&(terse?buf.push(key):buf.push(key+'="'+key+'"')):0==key.indexOf("data")&&"string"!=typeof val?buf.push(key+"='"+JSON.stringify(val)+"'"):"class"==key&&Array.isArray(val)?buf.push(key+'="'+exports.escape(val.join(" "))+'"'):escaped&&escaped[key]?buf.push(key+'="'+exports.escape(val)+'"'):buf.push(key+'="'+val+'"')}}return buf.join(" ")},exports.escape=function escape(html){return String(html).replace(/&(?!(\w+|\#\d+);)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err}}),require.register("self-closing.js",function(module,exports,require){module.exports=["meta","img","link","input","source","area","base","col","br","hr"]}),require.register("utils.js",function(module,exports,require){var interpolate=exports.interpolate=function(str){return str.replace(/(\\)?([#!]){(.*?)}/g,function(str,escape,flag,code){return escape?str:"' + "+("!"==flag?"":"escape")+"((interp = "+code.replace(/\\'/g,"'")+") == null ? '' : interp) + '"})},escape=exports.escape=function(str){return str.replace(/'/g,"\\'")};exports.text=function(str){return interpolate(escape(str))}}),window.jade=require("jade")})();
@@ -0,0 +1,654 @@
1
+
2
+ /*!
3
+ * Jade - Compiler
4
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
5
+ * MIT Licensed
6
+ */
7
+
8
+ /**
9
+ * Module dependencies.
10
+ */
11
+
12
+ var nodes = require('./nodes')
13
+ , filters = require('./filters')
14
+ , doctypes = require('./doctypes')
15
+ , selfClosing = require('./self-closing')
16
+ , runtime = require('./runtime')
17
+ , utils = require('./utils');
18
+
19
+ // if browser
20
+ //
21
+ // if (!Object.keys) {
22
+ // Object.keys = function(obj){
23
+ // var arr = [];
24
+ // for (var key in obj) {
25
+ // if (obj.hasOwnProperty(key)) {
26
+ // arr.push(key);
27
+ // }
28
+ // }
29
+ // return arr;
30
+ // }
31
+ // }
32
+ //
33
+ // if (!String.prototype.trimLeft) {
34
+ // String.prototype.trimLeft = function(){
35
+ // return this.replace(/^\s+/, '');
36
+ // }
37
+ // }
38
+ //
39
+ // end
40
+
41
+
42
+ /**
43
+ * Initialize `Compiler` with the given `node`.
44
+ *
45
+ * @param {Node} node
46
+ * @param {Object} options
47
+ * @api public
48
+ */
49
+
50
+ var Compiler = module.exports = function Compiler(node, options) {
51
+ this.options = options = options || {};
52
+ this.node = node;
53
+ this.hasCompiledDoctype = false;
54
+ this.hasCompiledTag = false;
55
+ this.pp = options.pretty || false;
56
+ this.debug = false !== options.compileDebug;
57
+ this.indents = 0;
58
+ this.parentIndents = 0;
59
+ if (options.doctype) this.setDoctype(options.doctype);
60
+ };
61
+
62
+ /**
63
+ * Compiler prototype.
64
+ */
65
+
66
+ Compiler.prototype = {
67
+
68
+ /**
69
+ * Compile parse tree to JavaScript.
70
+ *
71
+ * @api public
72
+ */
73
+
74
+ compile: function(){
75
+ this.buf = ['var interp;'];
76
+ if (this.pp) this.buf.push("var __indent = [];");
77
+ this.lastBufferedIdx = -1;
78
+ this.visit(this.node);
79
+ return this.buf.join('\n');
80
+ },
81
+
82
+ /**
83
+ * Sets the default doctype `name`. Sets terse mode to `true` when
84
+ * html 5 is used, causing self-closing tags to end with ">" vs "/>",
85
+ * and boolean attributes are not mirrored.
86
+ *
87
+ * @param {string} name
88
+ * @api public
89
+ */
90
+
91
+ setDoctype: function(name){
92
+ name = (name && name.toLowerCase()) || 'default';
93
+ this.doctype = doctypes[name] || '<!DOCTYPE ' + name + '>';
94
+ this.terse = this.doctype.toLowerCase() == '<!doctype html>';
95
+ this.xml = 0 == this.doctype.indexOf('<?xml');
96
+ },
97
+
98
+ /**
99
+ * Buffer the given `str` optionally escaped.
100
+ *
101
+ * @param {String} str
102
+ * @param {Boolean} esc
103
+ * @api public
104
+ */
105
+
106
+ buffer: function(str, esc){
107
+ if (esc) str = utils.escape(str);
108
+
109
+ if (this.lastBufferedIdx == this.buf.length) {
110
+ this.lastBuffered += str;
111
+ this.buf[this.lastBufferedIdx - 1] = "buf.push('" + this.lastBuffered + "');"
112
+ } else {
113
+ this.buf.push("buf.push('" + str + "');");
114
+ this.lastBuffered = str;
115
+ this.lastBufferedIdx = this.buf.length;
116
+ }
117
+ },
118
+
119
+ /**
120
+ * Buffer an indent based on the current `indent`
121
+ * property and an additional `offset`.
122
+ *
123
+ * @param {Number} offset
124
+ * @param {Boolean} newline
125
+ * @api public
126
+ */
127
+
128
+ prettyIndent: function(offset, newline){
129
+ offset = offset || 0;
130
+ newline = newline ? '\\n' : '';
131
+ this.buffer(newline + Array(this.indents + offset).join(' '));
132
+ if (this.parentIndents)
133
+ this.buf.push("buf.push.apply(buf, __indent);");
134
+ },
135
+
136
+ /**
137
+ * Visit `node`.
138
+ *
139
+ * @param {Node} node
140
+ * @api public
141
+ */
142
+
143
+ visit: function(node){
144
+ var debug = this.debug;
145
+
146
+ if (debug) {
147
+ this.buf.push('__jade.unshift({ lineno: ' + node.line
148
+ + ', filename: ' + (node.filename
149
+ ? JSON.stringify(node.filename)
150
+ : '__jade[0].filename')
151
+ + ' });');
152
+ }
153
+
154
+ // Massive hack to fix our context
155
+ // stack for - else[ if] etc
156
+ if (false === node.debug && this.debug) {
157
+ this.buf.pop();
158
+ this.buf.pop();
159
+ }
160
+
161
+ this.visitNode(node);
162
+
163
+ if (debug) this.buf.push('__jade.shift();');
164
+ },
165
+
166
+ /**
167
+ * Visit `node`.
168
+ *
169
+ * @param {Node} node
170
+ * @api public
171
+ */
172
+
173
+ visitNode: function(node){
174
+ var name = node.constructor.name
175
+ || node.constructor.toString().match(/function ([^(\s]+)()/)[1];
176
+ return this['visit' + name](node);
177
+ },
178
+
179
+ /**
180
+ * Visit case `node`.
181
+ *
182
+ * @param {Literal} node
183
+ * @api public
184
+ */
185
+
186
+ visitCase: function(node){
187
+ var _ = this.withinCase;
188
+ this.withinCase = true;
189
+ this.buf.push('switch (' + node.expr + '){');
190
+ this.visit(node.block);
191
+ this.buf.push('}');
192
+ this.withinCase = _;
193
+ },
194
+
195
+ /**
196
+ * Visit when `node`.
197
+ *
198
+ * @param {Literal} node
199
+ * @api public
200
+ */
201
+
202
+ visitWhen: function(node){
203
+ if ('default' == node.expr) {
204
+ this.buf.push('default:');
205
+ } else {
206
+ this.buf.push('case ' + node.expr + ':');
207
+ }
208
+ this.visit(node.block);
209
+ this.buf.push(' break;');
210
+ },
211
+
212
+ /**
213
+ * Visit literal `node`.
214
+ *
215
+ * @param {Literal} node
216
+ * @api public
217
+ */
218
+
219
+ visitLiteral: function(node){
220
+ var str = node.str.replace(/\n/g, '\\\\n');
221
+ this.buffer(str);
222
+ },
223
+
224
+ /**
225
+ * Visit all nodes in `block`.
226
+ *
227
+ * @param {Block} block
228
+ * @api public
229
+ */
230
+
231
+ visitBlock: function(block){
232
+ var len = block.nodes.length
233
+ , escape = this.escape
234
+ , pp = this.pp
235
+
236
+ // Block keyword has a special meaning in mixins
237
+ if (this.parentIndents && block.mode) {
238
+ if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');")
239
+ this.buf.push('block && block();');
240
+ if (pp) this.buf.push("__indent.pop();")
241
+ return;
242
+ }
243
+
244
+ // Pretty print multi-line text
245
+ if (pp && len > 1 && !escape && block.nodes[0].isText && block.nodes[1].isText)
246
+ this.prettyIndent(1, true);
247
+
248
+ for (var i = 0; i < len; ++i) {
249
+ // Pretty print text
250
+ if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText)
251
+ this.prettyIndent(1, false);
252
+
253
+ this.visit(block.nodes[i]);
254
+ // Multiple text nodes are separated by newlines
255
+ if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText)
256
+ this.buffer('\\n');
257
+ }
258
+ },
259
+
260
+ /**
261
+ * Visit `doctype`. Sets terse mode to `true` when html 5
262
+ * is used, causing self-closing tags to end with ">" vs "/>",
263
+ * and boolean attributes are not mirrored.
264
+ *
265
+ * @param {Doctype} doctype
266
+ * @api public
267
+ */
268
+
269
+ visitDoctype: function(doctype){
270
+ if (doctype && (doctype.val || !this.doctype)) {
271
+ this.setDoctype(doctype.val || 'default');
272
+ }
273
+
274
+ if (this.doctype) this.buffer(this.doctype);
275
+ this.hasCompiledDoctype = true;
276
+ },
277
+
278
+ /**
279
+ * Visit `mixin`, generating a function that
280
+ * may be called within the template.
281
+ *
282
+ * @param {Mixin} mixin
283
+ * @api public
284
+ */
285
+
286
+ visitMixin: function(mixin){
287
+ var name = mixin.name.replace(/-/g, '_') + '_mixin'
288
+ , args = mixin.args || ''
289
+ , block = mixin.block
290
+ , attrs = mixin.attrs
291
+ , pp = this.pp;
292
+
293
+ if (mixin.call) {
294
+ if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');")
295
+ if (block || attrs.length) {
296
+
297
+ this.buf.push(name + '.call({');
298
+
299
+ if (block) {
300
+ this.buf.push('block: function(){');
301
+
302
+ // Render block with no indents, dynamically added when rendered
303
+ this.parentIndents++;
304
+ var _indents = this.indents;
305
+ this.indents = 0;
306
+ this.visit(mixin.block);
307
+ this.indents = _indents;
308
+ this.parentIndents--;
309
+
310
+ if (attrs.length) {
311
+ this.buf.push('},');
312
+ } else {
313
+ this.buf.push('}');
314
+ }
315
+ }
316
+
317
+ if (attrs.length) {
318
+ var val = this.attrs(attrs);
319
+ if (val.inherits) {
320
+ this.buf.push('attributes: merge({' + val.buf
321
+ + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)');
322
+ } else {
323
+ this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped);
324
+ }
325
+ }
326
+
327
+ if (args) {
328
+ this.buf.push('}, ' + args + ');');
329
+ } else {
330
+ this.buf.push('});');
331
+ }
332
+
333
+ } else {
334
+ this.buf.push(name + '(' + args + ');');
335
+ }
336
+ if (pp) this.buf.push("__indent.pop();")
337
+ } else {
338
+ this.buf.push('var ' + name + ' = function(' + args + '){');
339
+ this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};');
340
+ this.parentIndents++;
341
+ this.visit(block);
342
+ this.parentIndents--;
343
+ this.buf.push('};');
344
+ }
345
+ },
346
+
347
+ /**
348
+ * Visit `tag` buffering tag markup, generating
349
+ * attributes, visiting the `tag`'s code and block.
350
+ *
351
+ * @param {Tag} tag
352
+ * @api public
353
+ */
354
+
355
+ visitTag: function(tag){
356
+ this.indents++;
357
+ var name = tag.name
358
+ , pp = this.pp;
359
+
360
+ if (tag.buffer) name = "' + (" + name + ") + '";
361
+
362
+ if (!this.hasCompiledTag) {
363
+ if (!this.hasCompiledDoctype && 'html' == name) {
364
+ this.visitDoctype();
365
+ }
366
+ this.hasCompiledTag = true;
367
+ }
368
+
369
+ // pretty print
370
+ if (pp && !tag.isInline())
371
+ this.prettyIndent(0, true);
372
+
373
+ if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) {
374
+ this.buffer('<' + name);
375
+ this.visitAttributes(tag.attrs);
376
+ this.terse
377
+ ? this.buffer('>')
378
+ : this.buffer('/>');
379
+ } else {
380
+ // Optimize attributes buffering
381
+ if (tag.attrs.length) {
382
+ this.buffer('<' + name);
383
+ if (tag.attrs.length) this.visitAttributes(tag.attrs);
384
+ this.buffer('>');
385
+ } else {
386
+ this.buffer('<' + name + '>');
387
+ }
388
+ if (tag.code) this.visitCode(tag.code);
389
+ this.escape = 'pre' == tag.name;
390
+ this.visit(tag.block);
391
+
392
+ // pretty print
393
+ if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline())
394
+ this.prettyIndent(0, true);
395
+
396
+ this.buffer('</' + name + '>');
397
+ }
398
+ this.indents--;
399
+ },
400
+
401
+ /**
402
+ * Visit `filter`, throwing when the filter does not exist.
403
+ *
404
+ * @param {Filter} filter
405
+ * @api public
406
+ */
407
+
408
+ visitFilter: function(filter){
409
+ var fn = filters[filter.name];
410
+
411
+ // unknown filter
412
+ if (!fn) {
413
+ if (filter.isASTFilter) {
414
+ throw new Error('unknown ast filter "' + filter.name + ':"');
415
+ } else {
416
+ throw new Error('unknown filter ":' + filter.name + '"');
417
+ }
418
+ }
419
+
420
+ if (filter.isASTFilter) {
421
+ this.buf.push(fn(filter.block, this, filter.attrs));
422
+ } else {
423
+ var text = filter.block.nodes.map(function(node){ return node.val }).join('\n');
424
+ filter.attrs = filter.attrs || {};
425
+ filter.attrs.filename = this.options.filename;
426
+ this.buffer(utils.text(fn(text, filter.attrs)));
427
+ }
428
+ },
429
+
430
+ /**
431
+ * Visit `text` node.
432
+ *
433
+ * @param {Text} text
434
+ * @api public
435
+ */
436
+
437
+ visitText: function(text){
438
+ text = utils.text(text.val.replace(/\\/g, '\\\\'));
439
+ if (this.escape) text = escape(text);
440
+ this.buffer(text);
441
+ },
442
+
443
+ /**
444
+ * Visit a `comment`, only buffering when the buffer flag is set.
445
+ *
446
+ * @param {Comment} comment
447
+ * @api public
448
+ */
449
+
450
+ visitComment: function(comment){
451
+ if (!comment.buffer) return;
452
+ if (this.pp) this.prettyIndent(1, true);
453
+ this.buffer('<!--' + utils.escape(comment.val) + '-->');
454
+ },
455
+
456
+ /**
457
+ * Visit a `BlockComment`.
458
+ *
459
+ * @param {Comment} comment
460
+ * @api public
461
+ */
462
+
463
+ visitBlockComment: function(comment){
464
+ if (!comment.buffer) return;
465
+ if (0 == comment.val.trim().indexOf('if')) {
466
+ this.buffer('<!--[' + comment.val.trim() + ']>');
467
+ this.visit(comment.block);
468
+ this.buffer('<![endif]-->');
469
+ } else {
470
+ this.buffer('<!--' + comment.val);
471
+ this.visit(comment.block);
472
+ this.buffer('-->');
473
+ }
474
+ },
475
+
476
+ /**
477
+ * Visit `code`, respecting buffer / escape flags.
478
+ * If the code is followed by a block, wrap it in
479
+ * a self-calling function.
480
+ *
481
+ * @param {Code} code
482
+ * @api public
483
+ */
484
+
485
+ visitCode: function(code){
486
+ // Wrap code blocks with {}.
487
+ // we only wrap unbuffered code blocks ATM
488
+ // since they are usually flow control
489
+
490
+ // Buffer code
491
+ if (code.buffer) {
492
+ var val = code.val.trimLeft();
493
+ this.buf.push('var __val__ = ' + val);
494
+ val = 'null == __val__ ? "" : __val__';
495
+ if (code.escape) val = 'escape(' + val + ')';
496
+ this.buf.push("buf.push(" + val + ");");
497
+ } else {
498
+ this.buf.push(code.val);
499
+ }
500
+
501
+ // Block support
502
+ if (code.block) {
503
+ if (!code.buffer) this.buf.push('{');
504
+ this.visit(code.block);
505
+ if (!code.buffer) this.buf.push('}');
506
+ }
507
+ },
508
+
509
+ /**
510
+ * Visit `each` block.
511
+ *
512
+ * @param {Each} each
513
+ * @api public
514
+ */
515
+
516
+ visitEach: function(each){
517
+ this.buf.push(''
518
+ + '// iterate ' + each.obj + '\n'
519
+ + ';(function(){\n'
520
+ + ' if (\'number\' == typeof ' + each.obj + '.length) {\n');
521
+
522
+ if (each.alternative) {
523
+ this.buf.push(' if (' + each.obj + '.length) {');
524
+ }
525
+
526
+ this.buf.push(''
527
+ + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n'
528
+ + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n');
529
+
530
+ this.visit(each.block);
531
+
532
+ this.buf.push(' }\n');
533
+
534
+ if (each.alternative) {
535
+ this.buf.push(' } else {');
536
+ this.visit(each.alternative);
537
+ this.buf.push(' }');
538
+ }
539
+
540
+ this.buf.push(''
541
+ + ' } else {\n'
542
+ + ' for (var ' + each.key + ' in ' + each.obj + ') {\n'
543
+ // if browser
544
+ // + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){'
545
+ // end
546
+ + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n');
547
+
548
+ this.visit(each.block);
549
+
550
+ // if browser
551
+ // this.buf.push(' }\n');
552
+ // end
553
+
554
+ this.buf.push(' }\n }\n}).call(this);\n');
555
+ },
556
+
557
+ /**
558
+ * Visit `attrs`.
559
+ *
560
+ * @param {Array} attrs
561
+ * @api public
562
+ */
563
+
564
+ visitAttributes: function(attrs){
565
+ var val = this.attrs(attrs);
566
+ if (val.inherits) {
567
+ this.buf.push("buf.push(attrs(merge({ " + val.buf +
568
+ " }, attributes), merge(" + val.escaped + ", escaped, true)));");
569
+ } else if (val.constant) {
570
+ eval('var buf={' + val.buf + '};');
571
+ this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true);
572
+ } else {
573
+ this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));");
574
+ }
575
+ },
576
+
577
+ /**
578
+ * Compile attributes.
579
+ */
580
+
581
+ attrs: function(attrs){
582
+ var buf = []
583
+ , classes = []
584
+ , escaped = {}
585
+ , constant = attrs.every(function(attr){ return isConstant(attr.val) })
586
+ , inherits = false;
587
+
588
+ if (this.terse) buf.push('terse: true');
589
+
590
+ attrs.forEach(function(attr){
591
+ if (attr.name == 'attributes') return inherits = true;
592
+ escaped[attr.name] = attr.escaped;
593
+ if (attr.name == 'class') {
594
+ classes.push('(' + attr.val + ')');
595
+ } else {
596
+ var pair = "'" + attr.name + "':(" + attr.val + ')';
597
+ buf.push(pair);
598
+ }
599
+ });
600
+
601
+ if (classes.length) {
602
+ classes = classes.join(" + ' ' + ");
603
+ buf.push("class: " + classes);
604
+ }
605
+
606
+ return {
607
+ buf: buf.join(', ').replace('class:', '"class":'),
608
+ escaped: JSON.stringify(escaped),
609
+ inherits: inherits,
610
+ constant: constant
611
+ };
612
+ }
613
+ };
614
+
615
+ /**
616
+ * Check if expression can be evaluated to a constant
617
+ *
618
+ * @param {String} expression
619
+ * @return {Boolean}
620
+ * @api private
621
+ */
622
+
623
+ function isConstant(val){
624
+ // Check strings/literals
625
+ if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))
626
+ return true;
627
+
628
+ // Check numbers
629
+ if (!isNaN(Number(val)))
630
+ return true;
631
+
632
+ // Check arrays
633
+ var matches;
634
+ if (matches = /^ *\[(.*)\] *$/.exec(val))
635
+ return matches[1].split(',').every(isConstant);
636
+
637
+ return false;
638
+ }
639
+
640
+ /**
641
+ * Escape the given string of `html`.
642
+ *
643
+ * @param {String} html
644
+ * @return {String}
645
+ * @api private
646
+ */
647
+
648
+ function escape(html){
649
+ return String(html)
650
+ .replace(/&(?!\w+;)/g, '&amp;')
651
+ .replace(/</g, '&lt;')
652
+ .replace(/>/g, '&gt;')
653
+ .replace(/"/g, '&quot;');
654
+ }