pleeease 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (615) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +23 -0
  6. data/Rakefile +1 -0
  7. data/lib/pleeease.rb +9 -0
  8. data/lib/pleeease/processor.rb +13 -0
  9. data/lib/pleeease/railtie.rb +10 -0
  10. data/lib/pleeease/runner.rb +70 -0
  11. data/lib/pleeease/version.rb +3 -0
  12. data/node_modules/.bin/pleeease +13 -0
  13. data/node_modules/.bin/pleeease-compile +20 -0
  14. data/node_modules/.bin/pleeease-watch +20 -0
  15. data/node_modules/pleeease/.jshintignore +1 -0
  16. data/node_modules/pleeease/.jshintrc +28 -0
  17. data/node_modules/pleeease/.npmignore +2 -0
  18. data/node_modules/pleeease/README.md +288 -0
  19. data/node_modules/pleeease/app.min.css.map +1 -0
  20. data/node_modules/pleeease/bin/pleeease +13 -0
  21. data/node_modules/pleeease/bin/pleeease-compile +20 -0
  22. data/node_modules/pleeease/bin/pleeease-watch +20 -0
  23. data/node_modules/pleeease/jshint.sh +2 -0
  24. data/node_modules/pleeease/lib/cli.js +136 -0
  25. data/node_modules/pleeease/lib/index.js +97 -0
  26. data/node_modules/pleeease/lib/options.js +38 -0
  27. data/node_modules/pleeease/lib/processors/import.js +123 -0
  28. data/node_modules/pleeease/lib/processors/pseudoElements.js +24 -0
  29. data/node_modules/pleeease/node_modules/.bin/autoprefixer +13 -0
  30. data/node_modules/pleeease/node_modules/.bin/csswring +3 -0
  31. data/node_modules/pleeease/node_modules/.bin/mkdirp +33 -0
  32. data/node_modules/pleeease/node_modules/autoprefixer/ChangeLog.md +354 -0
  33. data/node_modules/pleeease/node_modules/autoprefixer/LICENSE +20 -0
  34. data/node_modules/pleeease/node_modules/autoprefixer/README.md +565 -0
  35. data/node_modules/pleeease/node_modules/autoprefixer/bin/autoprefixer +13 -0
  36. data/node_modules/pleeease/node_modules/autoprefixer/data/browsers.js +53 -0
  37. data/node_modules/pleeease/node_modules/autoprefixer/data/prefixes.js +323 -0
  38. data/node_modules/pleeease/node_modules/autoprefixer/lib/autoprefixer.js +109 -0
  39. data/node_modules/pleeease/node_modules/autoprefixer/lib/binary.js +344 -0
  40. data/node_modules/pleeease/node_modules/autoprefixer/lib/browsers.js +197 -0
  41. data/node_modules/pleeease/node_modules/autoprefixer/lib/declaration.js +152 -0
  42. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/align-content.js +57 -0
  43. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/align-items.js +57 -0
  44. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/align-self.js +55 -0
  45. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/border-image.js +28 -0
  46. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/border-radius.js +56 -0
  47. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/break-inside.js +54 -0
  48. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/display-flex.js +67 -0
  49. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/fill-available.js +41 -0
  50. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/filter.js +29 -0
  51. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-basis.js +47 -0
  52. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-direction.js +71 -0
  53. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-flow.js +35 -0
  54. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-grow.js +41 -0
  55. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-shrink.js +47 -0
  56. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-spec.js +11 -0
  57. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex-wrap.js +33 -0
  58. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/flex.js +56 -0
  59. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/fullscreen.js +33 -0
  60. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/gradient.js +217 -0
  61. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/justify-content.js +62 -0
  62. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/order.js +52 -0
  63. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/placeholder.js +39 -0
  64. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/transform-decl.js +59 -0
  65. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/transform-value.js +31 -0
  66. data/node_modules/pleeease/node_modules/autoprefixer/lib/hacks/transition.js +37 -0
  67. data/node_modules/pleeease/node_modules/autoprefixer/lib/info.js +114 -0
  68. data/node_modules/pleeease/node_modules/autoprefixer/lib/keyframes.js +40 -0
  69. data/node_modules/pleeease/node_modules/autoprefixer/lib/old-selector.js +68 -0
  70. data/node_modules/pleeease/node_modules/autoprefixer/lib/old-value.js +29 -0
  71. data/node_modules/pleeease/node_modules/autoprefixer/lib/prefixer.js +88 -0
  72. data/node_modules/pleeease/node_modules/autoprefixer/lib/prefixes.js +334 -0
  73. data/node_modules/pleeease/node_modules/autoprefixer/lib/processor.js +105 -0
  74. data/node_modules/pleeease/node_modules/autoprefixer/lib/selector.js +117 -0
  75. data/node_modules/pleeease/node_modules/autoprefixer/lib/updater.js +234 -0
  76. data/node_modules/pleeease/node_modules/autoprefixer/lib/utils.js +41 -0
  77. data/node_modules/pleeease/node_modules/autoprefixer/lib/value.js +99 -0
  78. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/.npmignore +2 -0
  79. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/CHANGELOG.md +126 -0
  80. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/LICENSE +15 -0
  81. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/README.md +371 -0
  82. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/copy.js +79 -0
  83. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/create.js +55 -0
  84. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/ensure.js +4 -0
  85. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/index.js +137 -0
  86. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/json.js +30 -0
  87. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/mkdir.js +8 -0
  88. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/move.js +108 -0
  89. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/output.js +37 -0
  90. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/lib/remove.js +19 -0
  91. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/mkdirp +33 -0
  92. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/ncp +48 -0
  93. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/rimraf +33 -0
  94. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/.npmignore +2 -0
  95. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/CHANGELOG.md +20 -0
  96. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/LICENSE +15 -0
  97. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/README.md +121 -0
  98. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/lib/jsonfile.js +47 -0
  99. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/package.json +44 -0
  100. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.npmignore +2 -0
  101. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.travis.yml +5 -0
  102. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/LICENSE +21 -0
  103. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/bin/cmd.js +33 -0
  104. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/bin/usage.txt +12 -0
  105. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/examples/pow.js +6 -0
  106. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/index.js +97 -0
  107. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/.travis.yml +4 -0
  108. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/LICENSE +18 -0
  109. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/example/parse.js +2 -0
  110. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/index.js +187 -0
  111. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/package.json +52 -0
  112. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/readme.markdown +73 -0
  113. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/dash.js +24 -0
  114. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/default_bool.js +20 -0
  115. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/dotted.js +16 -0
  116. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/long.js +31 -0
  117. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/parse.js +318 -0
  118. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js +9 -0
  119. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/short.js +67 -0
  120. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/node_modules/minimist/test/whitespace.js +8 -0
  121. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/package.json +43 -0
  122. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/readme.markdown +100 -0
  123. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/chmod.js +38 -0
  124. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/clobber.js +37 -0
  125. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/mkdirp.js +26 -0
  126. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/opts_fs.js +27 -0
  127. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/opts_fs_sync.js +25 -0
  128. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm.js +30 -0
  129. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm_sync.js +34 -0
  130. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/race.js +40 -0
  131. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/rel.js +30 -0
  132. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return.js +25 -0
  133. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return_sync.js +24 -0
  134. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/root.js +18 -0
  135. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/sync.js +30 -0
  136. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask.js +26 -0
  137. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask_sync.js +30 -0
  138. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.npmignore +4 -0
  139. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.travis.yml +6 -0
  140. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/LICENSE.md +21 -0
  141. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/README.md +58 -0
  142. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/bin/ncp +48 -0
  143. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/lib/ncp.js +230 -0
  144. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/package.json +43 -0
  145. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/a +1 -0
  146. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/b +1 -0
  147. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/c +0 -0
  148. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/d +0 -0
  149. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/e +0 -0
  150. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/f +0 -0
  151. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/a +1 -0
  152. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/b +0 -0
  153. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/ncp.js +86 -0
  154. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/AUTHORS +6 -0
  155. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/LICENSE +23 -0
  156. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/README.md +30 -0
  157. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/bin.js +33 -0
  158. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/package.json +58 -0
  159. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/rimraf.js +248 -0
  160. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/run.sh +16 -0
  161. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/setup.sh +47 -0
  162. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-async.js +5 -0
  163. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-sync.js +3 -0
  164. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/fs-extra/package.json +68 -0
  165. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/ChangeLog.md +46 -0
  166. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/LICENSE +20 -0
  167. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/README.md +784 -0
  168. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js +94 -0
  169. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/comment.js +38 -0
  170. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/container.js +315 -0
  171. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js +69 -0
  172. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/lazy.js +18 -0
  173. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/list.js +64 -0
  174. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js +242 -0
  175. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/node.js +189 -0
  176. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/parse.js +496 -0
  177. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js +78 -0
  178. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/raw.js +32 -0
  179. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/result.js +26 -0
  180. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/root.js +57 -0
  181. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/rule.js +59 -0
  182. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/syntax-error.js +27 -0
  183. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js +27 -0
  184. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/.travis.yml +5 -0
  185. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/LICENSE.MIT +21 -0
  186. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/README.md +31 -0
  187. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/bench/bench.js +19 -0
  188. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/lib/b64.js +120 -0
  189. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/package.json +47 -0
  190. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/base64-js/test/convert.js +51 -0
  191. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.npmignore +2 -0
  192. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.tern-port +1 -0
  193. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.travis.yml +4 -0
  194. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/CHANGELOG.md +137 -0
  195. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/LICENSE +28 -0
  196. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/Makefile.dryice.js +166 -0
  197. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/README.md +446 -0
  198. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/assert-shim.js +56 -0
  199. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/mini-require.js +152 -0
  200. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  201. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-utils.jsm +18 -0
  202. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-browser.js +8 -0
  203. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  204. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-utils.jsm +21 -0
  205. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-prefix.js +8 -0
  206. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-suffix.js +3 -0
  207. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map.js +8 -0
  208. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/array-set.js +97 -0
  209. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  210. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64.js +42 -0
  211. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  212. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
  213. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-generator.js +400 -0
  214. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-node.js +400 -0
  215. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/util.js +302 -0
  216. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  217. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  218. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  219. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  220. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/package.json +39 -0
  221. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/package.json +132 -0
  222. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/run-tests.js +62 -0
  223. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-api.js +26 -0
  224. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  225. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  226. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64.js +35 -0
  227. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  228. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-dog-fooding.js +84 -0
  229. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-consumer.js +475 -0
  230. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-generator.js +549 -0
  231. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-node.js +487 -0
  232. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-util.js +127 -0
  233. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/util.js +161 -0
  234. data/node_modules/pleeease/node_modules/autoprefixer/node_modules/postcss/package.json +46 -0
  235. data/node_modules/pleeease/node_modules/autoprefixer/package.json +49 -0
  236. data/node_modules/pleeease/node_modules/autoprefixer/updaters/browsers.js +65 -0
  237. data/node_modules/pleeease/node_modules/autoprefixer/updaters/prefixes.js +273 -0
  238. data/node_modules/pleeease/node_modules/chokidar/.npmignore +35 -0
  239. data/node_modules/pleeease/node_modules/chokidar/CHANGELOG.md +95 -0
  240. data/node_modules/pleeease/node_modules/chokidar/README.md +121 -0
  241. data/node_modules/pleeease/node_modules/chokidar/example.js +3 -0
  242. data/node_modules/pleeease/node_modules/chokidar/index.js +425 -0
  243. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/README.md +22 -0
  244. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/index.js +45 -0
  245. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/package.json +39 -0
  246. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/recursive-raddir-test.js +17 -0
  247. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/a/a +0 -0
  248. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/a/beans +0 -0
  249. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/b/123 +0 -0
  250. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/b/b/hurp-durp +0 -0
  251. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/c.txt +0 -0
  252. data/node_modules/pleeease/node_modules/chokidar/node_modules/recursive-readdir/test/testdir/d.txt +0 -0
  253. data/node_modules/pleeease/node_modules/chokidar/package.json +55 -0
  254. data/node_modules/pleeease/node_modules/chokidar/test.js +296 -0
  255. data/node_modules/pleeease/node_modules/colors/MIT-LICENSE.txt +22 -0
  256. data/node_modules/pleeease/node_modules/colors/ReadMe.md +77 -0
  257. data/node_modules/pleeease/node_modules/colors/colors.js +342 -0
  258. data/node_modules/pleeease/node_modules/colors/example.html +76 -0
  259. data/node_modules/pleeease/node_modules/colors/example.js +77 -0
  260. data/node_modules/pleeease/node_modules/colors/package.json +29 -0
  261. data/node_modules/pleeease/node_modules/colors/test.js +70 -0
  262. data/node_modules/pleeease/node_modules/colors/themes/winston-dark.js +12 -0
  263. data/node_modules/pleeease/node_modules/colors/themes/winston-light.js +12 -0
  264. data/node_modules/pleeease/node_modules/commander/Readme.md +208 -0
  265. data/node_modules/pleeease/node_modules/commander/index.js +852 -0
  266. data/node_modules/pleeease/node_modules/commander/package.json +43 -0
  267. data/node_modules/pleeease/node_modules/css-mqpacker/.npmignore +3 -0
  268. data/node_modules/pleeease/node_modules/css-mqpacker/.sass-cache/ca3e061f00144e273a11e95ed4eb3170f1f7a328/maps-input.scssc +0 -0
  269. data/node_modules/pleeease/node_modules/css-mqpacker/.sass-cache/ca3e061f00144e273a11e95ed4eb3170f1f7a328/sourcemap-expected.scssc +0 -0
  270. data/node_modules/pleeease/node_modules/css-mqpacker/README.md +141 -0
  271. data/node_modules/pleeease/node_modules/css-mqpacker/index.js +1 -0
  272. data/node_modules/pleeease/node_modules/css-mqpacker/lib/css-mqpacker.js +43 -0
  273. data/node_modules/pleeease/node_modules/css-mqpacker/package.json +43 -0
  274. data/node_modules/pleeease/node_modules/css-mqpacker/test/css-mqpacker_test.js +64 -0
  275. data/node_modules/pleeease/node_modules/css-mqpacker/test/expected/multi.css +31 -0
  276. data/node_modules/pleeease/node_modules/css-mqpacker/test/expected/query-order.css +17 -0
  277. data/node_modules/pleeease/node_modules/css-mqpacker/test/expected/simple.css +37 -0
  278. data/node_modules/pleeease/node_modules/css-mqpacker/test/fixtures/multi.css +37 -0
  279. data/node_modules/pleeease/node_modules/css-mqpacker/test/fixtures/query-order.css +19 -0
  280. data/node_modules/pleeease/node_modules/css-mqpacker/test/fixtures/simple.css +41 -0
  281. data/node_modules/pleeease/node_modules/csswring/.npmignore +3 -0
  282. data/node_modules/pleeease/node_modules/csswring/README.md +55 -0
  283. data/node_modules/pleeease/node_modules/csswring/bin/csswring +3 -0
  284. data/node_modules/pleeease/node_modules/csswring/index.js +1 -0
  285. data/node_modules/pleeease/node_modules/csswring/lib/cli.js +93 -0
  286. data/node_modules/pleeease/node_modules/csswring/lib/csswring.js +110 -0
  287. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/.travis.yml +4 -0
  288. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/LICENSE +18 -0
  289. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/example/parse.js +2 -0
  290. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/index.js +187 -0
  291. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/package.json +52 -0
  292. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/readme.markdown +73 -0
  293. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/dash.js +24 -0
  294. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/default_bool.js +20 -0
  295. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/dotted.js +16 -0
  296. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/long.js +31 -0
  297. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/parse.js +318 -0
  298. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/parse_modified.js +9 -0
  299. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/short.js +67 -0
  300. data/node_modules/pleeease/node_modules/csswring/node_modules/minimist/test/whitespace.js +8 -0
  301. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/.gitmodules +3 -0
  302. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/.npmignore +2 -0
  303. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/LICENSE +24 -0
  304. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/Makefile +45 -0
  305. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/README.md +313 -0
  306. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/bin/build.js +29 -0
  307. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/component.json +11 -0
  308. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/demo/demo.css +58 -0
  309. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/demo/demo.js +35 -0
  310. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/demo/index.html +54 -0
  311. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color-namedColors.js +150 -0
  312. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color.js +231 -0
  313. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/CMYK.js +31 -0
  314. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/HSL.js +30 -0
  315. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/HSV.js +94 -0
  316. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/LAB.js +33 -0
  317. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/XYZ.js +65 -0
  318. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/_all.js +25 -0
  319. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/_base.js +6 -0
  320. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/clearer.js +3 -0
  321. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/darken.js +5 -0
  322. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/desaturate.js +5 -0
  323. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/greyscale.js +9 -0
  324. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/lighten.js +5 -0
  325. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/mix.js +17 -0
  326. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/negate.js +4 -0
  327. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/opaquer.js +3 -0
  328. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/rotate.js +3 -0
  329. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/saturate.js +5 -0
  330. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/color/plugins/toAlpha.js +46 -0
  331. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/ender.js +5 -0
  332. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/lib/es5-shim.js +97 -0
  333. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/one-color-all-debug.js +754 -0
  334. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/one-color-all.js +1 -0
  335. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/one-color-debug.js +359 -0
  336. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/one-color-ieshim.js +1 -0
  337. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/one-color.js +1 -0
  338. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/package.json +66 -0
  339. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/README.markdown +5 -0
  340. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/boilerplate.html +55 -0
  341. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/classList.js +116 -0
  342. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/img/rainbow-wood.jpg +0 -0
  343. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/index.html +234 -0
  344. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/license.txt +21 -0
  345. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/logo.png +0 -0
  346. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/logo.svg +52 -0
  347. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/plugins/css-controls.js +40 -0
  348. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/plugins/css-edit.js +132 -0
  349. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/plugins/css-snippets.js +89 -0
  350. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/plugins/incrementable.js +94 -0
  351. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/slideshow.css +288 -0
  352. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/slideshow.js +471 -0
  353. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/talk.css +41 -0
  354. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/3rdparty/CSSS/theme.css +214 -0
  355. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/colorcat/css/colorcat.css +36 -0
  356. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/colorcat/css/demo.css +677 -0
  357. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/colorcat/images/transparent.gif +0 -0
  358. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/colorcat/js/colorcat.js +135 -0
  359. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/colorcat/js/one-color-debug.js +1137 -0
  360. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/1024px-HSV_color_solid_cylinder_alpha_lowgamma.png +0 -0
  361. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/ExtJS.png +0 -0
  362. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/HSL.png +0 -0
  363. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/HSV.png +0 -0
  364. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/Hsl-hsv_models_b.svg +450 -0
  365. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/Pixels.jpg +0 -0
  366. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/PullingHair.png +0 -0
  367. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/RGB.png +0 -0
  368. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/RGB_HSL_HSV_comparison.png +0 -0
  369. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/Space_Rainbow_desktop_background_pictures.jpg +0 -0
  370. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/blog.png +0 -0
  371. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/calendar.png +0 -0
  372. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/images/colorSpace.jpg +0 -0
  373. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/index.html +562 -0
  374. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/talk.css +137 -0
  375. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/slides/CPHJS-Oct2011/theme.css +247 -0
  376. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/test/color-test.js +178 -0
  377. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/test/conversion-test.js +46 -0
  378. data/node_modules/pleeease/node_modules/csswring/node_modules/onecolor/test/samples.js +147 -0
  379. data/node_modules/pleeease/node_modules/csswring/package.json +51 -0
  380. data/node_modules/pleeease/node_modules/csswring/test/csswring_test.js +67 -0
  381. data/node_modules/pleeease/node_modules/csswring/test/expected/empty-declarations.css +1 -0
  382. data/node_modules/pleeease/node_modules/csswring/test/expected/extra-semicolons.css +1 -0
  383. data/node_modules/pleeease/node_modules/csswring/test/expected/issue3.css +1 -0
  384. data/node_modules/pleeease/node_modules/csswring/test/expected/simple.css +3 -0
  385. data/node_modules/pleeease/node_modules/csswring/test/expected/single-charset.css +1 -0
  386. data/node_modules/pleeease/node_modules/csswring/test/expected/value.css +1 -0
  387. data/node_modules/pleeease/node_modules/csswring/test/fixtures/empty-declarations.css +12 -0
  388. data/node_modules/pleeease/node_modules/csswring/test/fixtures/extra-semicolons.css +4 -0
  389. data/node_modules/pleeease/node_modules/csswring/test/fixtures/issue3.css +3 -0
  390. data/node_modules/pleeease/node_modules/csswring/test/fixtures/simple.css +31 -0
  391. data/node_modules/pleeease/node_modules/csswring/test/fixtures/single-charset.css +13 -0
  392. data/node_modules/pleeease/node_modules/csswring/test/fixtures/value.css +14 -0
  393. data/node_modules/pleeease/node_modules/deep-extend/.npmignore +1 -0
  394. data/node_modules/pleeease/node_modules/deep-extend/LICENSE +20 -0
  395. data/node_modules/pleeease/node_modules/deep-extend/README.md +52 -0
  396. data/node_modules/pleeease/node_modules/deep-extend/index.js +87 -0
  397. data/node_modules/pleeease/node_modules/deep-extend/package.json +45 -0
  398. data/node_modules/pleeease/node_modules/deep-extend/test/index.spec.js +44 -0
  399. data/node_modules/pleeease/node_modules/deep-extend/test/mocha.opts +1 -0
  400. data/node_modules/pleeease/node_modules/mkdirp/.npmignore +2 -0
  401. data/node_modules/pleeease/node_modules/mkdirp/.travis.yml +5 -0
  402. data/node_modules/pleeease/node_modules/mkdirp/LICENSE +21 -0
  403. data/node_modules/pleeease/node_modules/mkdirp/bin/cmd.js +33 -0
  404. data/node_modules/pleeease/node_modules/mkdirp/bin/usage.txt +12 -0
  405. data/node_modules/pleeease/node_modules/mkdirp/examples/pow.js +6 -0
  406. data/node_modules/pleeease/node_modules/mkdirp/index.js +80 -0
  407. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/.travis.yml +4 -0
  408. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/LICENSE +18 -0
  409. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/example/parse.js +2 -0
  410. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/index.js +187 -0
  411. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/package.json +52 -0
  412. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/readme.markdown +73 -0
  413. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/dash.js +24 -0
  414. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/default_bool.js +20 -0
  415. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/dotted.js +16 -0
  416. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/long.js +31 -0
  417. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/parse.js +318 -0
  418. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js +9 -0
  419. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/short.js +67 -0
  420. data/node_modules/pleeease/node_modules/mkdirp/node_modules/minimist/test/whitespace.js +8 -0
  421. data/node_modules/pleeease/node_modules/mkdirp/package.json +42 -0
  422. data/node_modules/pleeease/node_modules/mkdirp/readme.markdown +90 -0
  423. data/node_modules/pleeease/node_modules/mkdirp/test/chmod.js +38 -0
  424. data/node_modules/pleeease/node_modules/mkdirp/test/clobber.js +37 -0
  425. data/node_modules/pleeease/node_modules/mkdirp/test/mkdirp.js +28 -0
  426. data/node_modules/pleeease/node_modules/mkdirp/test/perm.js +32 -0
  427. data/node_modules/pleeease/node_modules/mkdirp/test/perm_sync.js +39 -0
  428. data/node_modules/pleeease/node_modules/mkdirp/test/race.js +41 -0
  429. data/node_modules/pleeease/node_modules/mkdirp/test/rel.js +32 -0
  430. data/node_modules/pleeease/node_modules/mkdirp/test/return.js +25 -0
  431. data/node_modules/pleeease/node_modules/mkdirp/test/return_sync.js +24 -0
  432. data/node_modules/pleeease/node_modules/mkdirp/test/root.js +18 -0
  433. data/node_modules/pleeease/node_modules/mkdirp/test/sync.js +32 -0
  434. data/node_modules/pleeease/node_modules/mkdirp/test/umask.js +28 -0
  435. data/node_modules/pleeease/node_modules/mkdirp/test/umask_sync.js +32 -0
  436. data/node_modules/pleeease/node_modules/multi-glob/.npmignore +2 -0
  437. data/node_modules/pleeease/node_modules/multi-glob/.travis.yml +3 -0
  438. data/node_modules/pleeease/node_modules/multi-glob/AUTHORS +2 -0
  439. data/node_modules/pleeease/node_modules/multi-glob/LICENSE +27 -0
  440. data/node_modules/pleeease/node_modules/multi-glob/Readme.rst +42 -0
  441. data/node_modules/pleeease/node_modules/multi-glob/autolint.js +20 -0
  442. data/node_modules/pleeease/node_modules/multi-glob/buster.js +6 -0
  443. data/node_modules/pleeease/node_modules/multi-glob/lib/multi-glob.js +39 -0
  444. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/.travis.yml +3 -0
  445. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/LICENSE +19 -0
  446. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/README.md +1646 -0
  447. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/component.json +11 -0
  448. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/lib/async.js +1123 -0
  449. data/node_modules/pleeease/node_modules/multi-glob/node_modules/async/package.json +45 -0
  450. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/.npmignore +2 -0
  451. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/.travis.yml +4 -0
  452. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/LICENSE +27 -0
  453. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/README.md +250 -0
  454. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/examples/g.js +9 -0
  455. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/examples/usr-local.js +9 -0
  456. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/glob.js +738 -0
  457. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  458. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/README.md +42 -0
  459. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  460. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  461. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/package.json +33 -0
  462. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/inherits/test.js +25 -0
  463. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
  464. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
  465. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/README.md +218 -0
  466. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/minimatch.js +1061 -0
  467. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore +1 -0
  468. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
  469. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
  470. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
  471. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
  472. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
  473. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
  474. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
  475. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
  476. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
  477. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
  478. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
  479. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
  480. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
  481. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
  482. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/package.json +42 -0
  483. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
  484. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/test/brace-expand.js +33 -0
  485. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/test/caching.js +14 -0
  486. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
  487. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  488. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/once/LICENSE +27 -0
  489. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/once/README.md +51 -0
  490. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/once/once.js +20 -0
  491. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/once/package.json +42 -0
  492. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/node_modules/once/test/once.js +20 -0
  493. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/package.json +43 -0
  494. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/00-setup.js +176 -0
  495. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/bash-comparison.js +63 -0
  496. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/bash-results.json +354 -0
  497. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/cwd-test.js +55 -0
  498. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/empty-set.js +20 -0
  499. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/error-callback.js +20 -0
  500. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/globstar-match.js +19 -0
  501. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/mark.js +118 -0
  502. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/new-glob-optional-options.js +10 -0
  503. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/nocase-nomagic.js +124 -0
  504. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/pause-resume.js +73 -0
  505. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/readme-issue.js +36 -0
  506. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/root-nomount.js +39 -0
  507. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/root.js +46 -0
  508. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/stat.js +32 -0
  509. data/node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/zz-cleanup.js +11 -0
  510. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/LICENSE.txt +22 -0
  511. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/README.md +163 -0
  512. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.compat.js +7157 -0
  513. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.compat.min.js +61 -0
  514. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.js +6785 -0
  515. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.min.js +56 -0
  516. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.underscore.js +4979 -0
  517. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/dist/lodash.underscore.min.js +39 -0
  518. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/lodash.js +7179 -0
  519. data/node_modules/pleeease/node_modules/multi-glob/node_modules/lodash/package.json +102 -0
  520. data/node_modules/pleeease/node_modules/multi-glob/package.json +46 -0
  521. data/node_modules/pleeease/node_modules/multi-glob/test/multi-glob-test.js +113 -0
  522. data/node_modules/pleeease/node_modules/pixrem/.editorconfig +13 -0
  523. data/node_modules/pleeease/node_modules/pixrem/.gitattributes +1 -0
  524. data/node_modules/pleeease/node_modules/pixrem/.gitignore +2 -0
  525. data/node_modules/pleeease/node_modules/pixrem/.jshintrc +22 -0
  526. data/node_modules/pleeease/node_modules/pixrem/.travis.yml +4 -0
  527. data/node_modules/pleeease/node_modules/pixrem/LICENSE +22 -0
  528. data/node_modules/pleeease/node_modules/pixrem/README.md +108 -0
  529. data/node_modules/pleeease/node_modules/pixrem/lib/pixrem.js +73 -0
  530. data/node_modules/pleeease/node_modules/pixrem/package.json +50 -0
  531. data/node_modules/pleeease/node_modules/pixrem/spec/pixrem-spec.js +78 -0
  532. data/node_modules/pleeease/node_modules/postcss-vars/README.md +84 -0
  533. data/node_modules/pleeease/node_modules/postcss-vars/lib/index.js +91 -0
  534. data/node_modules/pleeease/node_modules/postcss-vars/package.json +18 -0
  535. data/node_modules/pleeease/node_modules/postcss/ChangeLog.md +42 -0
  536. data/node_modules/pleeease/node_modules/postcss/LICENSE +20 -0
  537. data/node_modules/pleeease/node_modules/postcss/README.md +732 -0
  538. data/node_modules/pleeease/node_modules/postcss/lib/at-rule.js +94 -0
  539. data/node_modules/pleeease/node_modules/postcss/lib/comment.js +38 -0
  540. data/node_modules/pleeease/node_modules/postcss/lib/container.js +315 -0
  541. data/node_modules/pleeease/node_modules/postcss/lib/declaration.js +69 -0
  542. data/node_modules/pleeease/node_modules/postcss/lib/lazy.js +18 -0
  543. data/node_modules/pleeease/node_modules/postcss/lib/list.js +64 -0
  544. data/node_modules/pleeease/node_modules/postcss/lib/map-generator.js +242 -0
  545. data/node_modules/pleeease/node_modules/postcss/lib/node.js +189 -0
  546. data/node_modules/pleeease/node_modules/postcss/lib/parse.js +496 -0
  547. data/node_modules/pleeease/node_modules/postcss/lib/postcss.js +76 -0
  548. data/node_modules/pleeease/node_modules/postcss/lib/raw.js +32 -0
  549. data/node_modules/pleeease/node_modules/postcss/lib/result.js +22 -0
  550. data/node_modules/pleeease/node_modules/postcss/lib/root.js +57 -0
  551. data/node_modules/pleeease/node_modules/postcss/lib/rule.js +59 -0
  552. data/node_modules/pleeease/node_modules/postcss/lib/syntax-error.js +27 -0
  553. data/node_modules/pleeease/node_modules/postcss/lib/vendor.js +27 -0
  554. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/.travis.yml +5 -0
  555. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/LICENSE.MIT +21 -0
  556. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/README.md +31 -0
  557. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/bench/bench.js +19 -0
  558. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/lib/b64.js +120 -0
  559. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/package.json +47 -0
  560. data/node_modules/pleeease/node_modules/postcss/node_modules/base64-js/test/convert.js +51 -0
  561. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/.npmignore +2 -0
  562. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/.tern-port +1 -0
  563. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/.travis.yml +4 -0
  564. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/CHANGELOG.md +137 -0
  565. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/LICENSE +28 -0
  566. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/Makefile.dryice.js +166 -0
  567. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/README.md +446 -0
  568. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/assert-shim.js +56 -0
  569. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/mini-require.js +152 -0
  570. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  571. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/prefix-utils.jsm +18 -0
  572. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/suffix-browser.js +8 -0
  573. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  574. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/suffix-utils.jsm +21 -0
  575. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/test-prefix.js +8 -0
  576. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/build/test-suffix.js +3 -0
  577. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map.js +8 -0
  578. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/array-set.js +97 -0
  579. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  580. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/base64.js +42 -0
  581. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  582. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
  583. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-generator.js +400 -0
  584. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/source-node.js +400 -0
  585. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/lib/source-map/util.js +302 -0
  586. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  587. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  588. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  589. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  590. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/node_modules/amdefine/package.json +38 -0
  591. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/package.json +132 -0
  592. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/run-tests.js +62 -0
  593. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-api.js +26 -0
  594. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  595. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  596. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-base64.js +35 -0
  597. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  598. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-dog-fooding.js +84 -0
  599. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-consumer.js +475 -0
  600. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-generator.js +549 -0
  601. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-source-node.js +487 -0
  602. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/test-util.js +127 -0
  603. data/node_modules/pleeease/node_modules/postcss/node_modules/source-map/test/source-map/util.js +161 -0
  604. data/node_modules/pleeease/node_modules/postcss/package.json +46 -0
  605. data/node_modules/pleeease/package.json +40 -0
  606. data/node_modules/pleeease/spec/pleeease-spec.js +112 -0
  607. data/node_modules/pleeease/spec/prefixes.css +1 -0
  608. data/node_modules/pleeease/test/.pleeeaserc +7 -0
  609. data/node_modules/pleeease/test/app.min.css +42 -0
  610. data/node_modules/pleeease/test/bar.css +11 -0
  611. data/node_modules/pleeease/test/foo.css +25 -0
  612. data/node_modules/pleeease/test/import/imported.css +3 -0
  613. data/package.json +11 -0
  614. data/pleeease.gemspec +23 -0
  615. metadata +685 -0
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "async",
3
+ "description": "Higher-order functions and common patterns for asynchronous code",
4
+ "main": "./lib/async",
5
+ "author": {
6
+ "name": "Caolan McMahon"
7
+ },
8
+ "version": "0.9.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/caolan/async.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/caolan/async/issues"
15
+ },
16
+ "licenses": [
17
+ {
18
+ "type": "MIT",
19
+ "url": "https://github.com/caolan/async/raw/master/LICENSE"
20
+ }
21
+ ],
22
+ "devDependencies": {
23
+ "nodeunit": ">0.0.0",
24
+ "uglify-js": "1.2.x",
25
+ "nodelint": ">0.0.0"
26
+ },
27
+ "jam": {
28
+ "main": "lib/async.js",
29
+ "include": [
30
+ "lib/async.js",
31
+ "README.md",
32
+ "LICENSE"
33
+ ]
34
+ },
35
+ "scripts": {
36
+ "test": "nodeunit test/test-async.js"
37
+ },
38
+ "readme": "# Async.js\n\n[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)\n\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [Node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns\nfor asynchronous control flow (`parallel`, `series`, `waterfall`…). All these\nfunctions assume you follow the Node.js convention of providing a single\ncallback as the last argument of your `async` function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about `bind`, not about `async`. If you are wondering how to\nmake `async` execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (`npm`):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. \n\nUsage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [`each`](#each)\n* [`eachSeries`](#eachSeries)\n* [`eachLimit`](#eachLimit)\n* [`map`](#map)\n* [`mapSeries`](#mapSeries)\n* [`mapLimit`](#mapLimit)\n* [`filter`](#filter)\n* [`filterSeries`](#filterSeries)\n* [`reject`](#reject)\n* [`rejectSeries`](#rejectSeries)\n* [`reduce`](#reduce)\n* [`reduceRight`](#reduceRight)\n* [`detect`](#detect)\n* [`detectSeries`](#detectSeries)\n* [`sortBy`](#sortBy)\n* [`some`](#some)\n* [`every`](#every)\n* [`concat`](#concat)\n* [`concatSeries`](#concatSeries)\n\n### Control Flow\n\n* [`series`](#seriestasks-callback)\n* [`parallel`](#parallel)\n* [`parallelLimit`](#parallellimittasks-limit-callback)\n* [`whilst`](#whilst)\n* [`doWhilst`](#doWhilst)\n* [`until`](#until)\n* [`doUntil`](#doUntil)\n* [`forever`](#forever)\n* [`waterfall`](#waterfall)\n* [`compose`](#compose)\n* [`seq`](#seq)\n* [`applyEach`](#applyEach)\n* [`applyEachSeries`](#applyEachSeries)\n* [`queue`](#queue)\n* [`priorityQueue`](#priorityQueue)\n* [`cargo`](#cargo)\n* [`auto`](#auto)\n* [`retry`](#retry)\n* [`iterator`](#iterator)\n* [`apply`](#apply)\n* [`nextTick`](#nextTick)\n* [`times`](#times)\n* [`timesSeries`](#timesSeries)\n\n### Utils\n\n* [`memoize`](#memoize)\n* [`unmemoize`](#unmemoize)\n* [`log`](#log)\n* [`dir`](#dir)\n* [`noConflict`](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies the function `iterator` to each item in `arr`, in parallel.\nThe `iterator` is called with an item from the list, and a callback for when it\nhas finished. If the `iterator` passes an error to its `callback`, the main\n`callback` (for the `each` function) is immediately called with the error.\n\nNote, that since this function applies `iterator` to each item in parallel,\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has \n completed. If no error has occured, the `callback` should be run without \n arguments or with an explicit `null` argument.\n* `callback(err)` - A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Examples__\n\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n```js\n// assuming openFiles is an array of file names \n\nasync.each(openFiles, function( file, callback) {\n \n // Perform operation on file here.\n console.log('Processing file ' + file);\n \n if( file.length > 32 ) {\n console.log('This file name is too long');\n callback('File name too long');\n } else {\n // Do work to process file here\n console.log('File processed');\n callback();\n }\n}, function(err){\n // if any of the file processing produced an error, err would equal that error\n if( err ) {\n // One of the iterations produced an error.\n // All processing will now stop.\n console.log('A file failed to process');\n } else {\n console.log('All files have been processed successfully');\n }\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as [`each`](#each), only `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThis means the `iterator` functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously \nrunning at any time.\n\nNote that the items in `arr` are not processed in batches, so there is no guarantee that \nthe first `limit` `iterator` functions will complete before any others are started.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `limit` - The maximum number of `iterator`s to run at any time.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit `null` argument.\n* `callback(err)` - A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in `arr` through\nthe `iterator` function. The `iterator` is called with an item from `arr` and a\ncallback for when it has finished processing. Each of these callback takes 2 arguments: \nan `error`, and the transformed item from `arr`. If `iterator` passes an error to this \ncallback, the main `callback` (for the `map` function) is immediately called with the error.\n\nNote, that since this function applies the `iterator` to each item in parallel,\nthere is no guarantee that the `iterator` functions will complete in order. \nHowever, the results array will be in the same order as the original `arr`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once \n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - A callback which is called when all `iterator`\n functions have finished, or an error occurs. Results is an array of the\n transformed items from the `arr`.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as [`map`](#map), only the `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that \nthe first `limit` `iterator` functions will complete before any others are started.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `limit` - The maximum number of `iterator`s to run at any time.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once \n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - A callback which is called when all `iterator`\n calls have finished, or an error occurs. The result is an array of the\n transformed items from the original `arr`.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"select\" />\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ `select`\n\nReturns a new array of all the values in `arr` which pass an async truth test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The `iterator` is passed a `callback(truthValue)`, which must be called with a \n boolean argument once it has completed.\n* `callback(results)` - A callback which is called after all the `iterator`\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"selectSeries\" />\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__Alias:__ `selectSeries`\n\nThe same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of [`filter`](#filter). Removes values that pass an `async` truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as [`reject`](#reject), only the `iterator` is applied to each item in `arr`\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__Aliases:__ `inject`, `foldl`\n\nReduces `arr` into a single value using an async `iterator` to return\neach successive step. `memo` is the initial state of the reduction. \nThis function only operates in series. \n\nFor performance reasons, it may make sense to split a call to this function into \na parallel map, and then use the normal `Array.prototype.reduce` on the results. \nThis function is for situations where each step in the reduction needs to be async; \nif you can get the data before reducing it, then it's probably a good idea to do so.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `memo` - The initial state of the reduction.\n* `iterator(memo, item, callback)` - A function applied to each item in the\n array to produce the next step in the reduction. The `iterator` is passed a\n `callback(err, reduction)` which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main `callback` is \n immediately called with the error.\n* `callback(err, result)` - A callback which is called after all the `iterator`\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ `foldr`\n\nSame as [`reduce`](#reduce), only operates on `arr` in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in `arr` that passes an async truth test. The\n`iterator` is applied in parallel, meaning the first iterator to return `true` will\nfire the detect `callback` with that result. That means the result might not be\nthe first item in the original `arr` (in terms of order) that passes the test.\n\nIf order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The iterator is passed a `callback(truthValue)` which must be called with a \n boolean argument once it has completed.\n* `callback(result)` - A callback which is called as soon as any iterator returns\n `true`, or after all the `iterator` functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value `undefined` if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as [`detect`](#detect), only the `iterator` is applied to each item in `arr`\nin series. This means the result is always the first in the original `arr` (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each `arr` value through an async `iterator`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, sortValue)` which must be called once it\n has completed with an error (which can be `null`) and a value to use as the sort\n criteria.\n* `callback(err, results)` - A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is the items from\n the original `arr` sorted by the values returned by the `iterator` calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n__Sort Order__\n\nBy modifying the callback parameter the sorting order can be influenced:\n\n```js\n//ascending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(err, x);\n}, function(err,result){\n //result callback\n} );\n\n//descending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(err, x*-1); //<- x*-1 instead of x, turns the order around\n}, function(err,result){\n //result callback\n} );\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ `any`\n\nReturns `true` if at least one element in the `arr` satisfies an async test.\n_The callback for each iterator call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. Once any iterator\ncall returns `true`, the main `callback` is immediately called.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a callback(truthValue) which must be \n called with a boolean argument once it has completed.\n* `callback(result)` - A callback which is called as soon as any iterator returns\n `true`, or after all the iterator functions have finished. Result will be\n either `true` or `false` depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ `all`\n\nReturns `true` if every element in `arr` satisfies an async test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a callback(truthValue) which must be \n called with a boolean argument once it has completed.\n* `callback(result)` - A callback which is called after all the `iterator`\n functions have finished. Result will be either `true` or `false` depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies `iterator` to each item in `arr`, concatenating the results. Returns the\nconcatenated list. The `iterator`s are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of `arr` passed to the `iterator` function.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, results)` which must be called once it \n has completed with an error (which can be `null`) and an array of results.\n* `callback(err, results)` - A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is an array containing\n the concatenated results of the `iterator` function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as [`concat`](#concat), but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun the functions in the `tasks` array in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run, and `callback` is immediately called with the value of the error. \nOtherwise, `callback` receives an array of results when `tasks` have completed.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function, and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`series`](#series).\n\n**Note** that while many implementations preserve the order of object properties, the\n[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) \nexplicitly states that\n\n> The mechanics and order of enumerating the properties is not specified.\n\nSo if you rely on the order in which your series of functions are executed, and want\nthis to work on all platforms, consider using an array. \n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed\n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the `task` callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun the `tasks` array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main `callback` is immediately called with the value of the error.\nOnce the `tasks` have completed, the results are passed to the final `callback` as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`parallel`](#parallel).\n\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run. Each function is passed \n a `callback(err, result)` which it must call on completion with an error `err` \n (which can be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallelLimit\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as [`parallel`](#parallel), only `tasks` are executed in parallel \nwith a maximum of `limit` tasks executing at any time.\n\nNote that the `tasks` are not executed in batches, so there is no guarantee that \nthe first `limit` tasks will complete before any others are started.\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed \n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `limit` - The maximum number of `tasks` to run at any time.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the `task` callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\n__Arguments__\n\n* `test()` - synchronous truth test to perform before each execution of `fn`.\n* `fn(callback)` - A function which is called each time `test` passes. The function is\n passed a `callback(err)`, which must be called once it has completed with an \n optional `err` argument.\n* `callback(err)` - A callback which is called after the test fails and repeated\n execution of `fn` has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post-check version of [`whilst`](#whilst). To reflect the difference in \nthe order of operations, the arguments `test` and `fn` are switched. \n\n`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\nThe inverse of [`whilst`](#whilst).\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, errback)\n\nCalls the asynchronous function `fn` with a callback parameter that allows it to\ncall itself again, in series, indefinitely.\n\nIf an error is passed to the callback then `errback` is called with the\nerror, and execution stops, otherwise it will never be called.\n\n```js\nasync.forever(\n function(next) {\n // next is suitable for passing to things that need a callback(err [, whatever]);\n // it will result in this function being called again.\n },\n function(err) {\n // if next is called with a value in its first parameter, it will appear\n // in here as 'err', and execution will stop.\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns the `tasks` array of functions in series, each passing their results to the next in\nthe array. However, if any of the `tasks` pass an error to their own callback, the\nnext function is not executed, and the main `callback` is immediately called with\nthe error.\n\n__Arguments__\n\n* `tasks` - An array of functions to run, each function is passed a \n `callback(err, result1, result2, ...)` it must call on completion. The first\n argument is an error (which can be `null`) and any further arguments will be \n passed as arguments in order to the next task.\n* `callback(err, [results])` - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions `f()`, `g()`, and `h()` would produce the result of\n`f(g(h()))`, only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"seq\" />\n### seq(fn1, fn2...)\n\nVersion of the compose function that is more natural to read.\nEach following function consumes the return value of the latter function. \n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\n// Requires lodash (or underscore), express3 and dresende's orm2.\n// Part of an app, that fetches cats of the logged user.\n// This example uses `seq` function to avoid overnesting and error \n// handling clutter.\napp.get('/cats', function(request, response) {\n function handleError(err, data, callback) {\n if (err) {\n console.error(err);\n response.json({ status: 'error', message: err.message });\n }\n else {\n callback(data);\n }\n }\n var User = request.models.User;\n async.seq(\n _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))\n handleError,\n function(user, fn) {\n user.getCats(fn); // 'getCats' has signature (callback(err, data))\n },\n handleError,\n function(cats) {\n response.json({ status: 'ok', message: 'Cats found', data: cats });\n }\n )(req.session.user_id);\n }\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling \n`callback` after all functions have completed. If you only provide the first\nargument, then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* `fns` - the asynchronous functions to all call with the same arguments\n* `args...` - any number of separate arguments to pass to the function\n* `callback` - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as [`applyEach`](#applyEach) only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a `queue` object with the specified `concurrency`. Tasks added to the\n`queue` are processed in parallel (up to the `concurrency` limit). If all\n`worker`s are in progress, the task is queued until one becomes available. \nOnce a `worker` completes a `task`, that `task`'s callback is called.\n\n__Arguments__\n\n* `worker(task, callback)` - An asynchronous function for processing a queued\n task, which must call its `callback(err)` argument when finished, with an \n optional `error` as an argument.\n* `concurrency` - An `integer` for determining how many `worker` functions should be\n run in parallel.\n\n__Queue objects__\n\nThe `queue` object returned by this function has the following properties and\nmethods:\n\n* `length()` - a function returning the number of items waiting to be processed.\n* `started` - a function returning whether or not any items have been pushed and processed by the queue\n* `running()` - a function returning the number of items currently being processed.\n* `idle()` - a function returning false if there are items waiting or being processed, or true if not.\n* `concurrency` - an integer for determining how many `worker` functions should be\n run in parallel. This property can be changed after a `queue` is created to\n alter the concurrency on-the-fly.\n* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once \n the `worker` has finished processing the task. Instead of a single task, a `tasks` array\n can be submitted. The respective callback is used for every task in the list.\n* `unshift(task, [callback])` - add a new task to the front of the `queue`.\n* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, \n and further tasks will be queued.\n* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.\n* `paused` - a boolean for determining whether the queue is in a paused state\n* `pause()` - a function that pauses the processing of tasks until `resume()` is called.\n* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.\n* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle.\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n\n---------------------------------------\n\n<a name=\"priorityQueue\" />\n### priorityQueue(worker, concurrency)\n\nThe same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:\n\n* `push(task, priority, [callback])` - `priority` should be a number. If an array of\n `tasks` is given, all tasks will be assigned the same priority.\n* The `unshift` method was removed.\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a `cargo` object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the `payload` limit). If the\n`worker` is in progress, the task is queued until it becomes available. Once\nthe `worker` has completed some tasks, each callback of those tasks is called.\nCheck out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work.\n\nWhile [queue](#queue) passes only one task to one of a group of workers\nat a time, cargo passes an array of tasks to a single worker, repeating\nwhen the worker is finished.\n\n__Arguments__\n\n* `worker(tasks, callback)` - An asynchronous function for processing an array of\n queued tasks, which must call its `callback(err)` argument when finished, with \n an optional `err` argument.\n* `payload` - An optional `integer` for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe `cargo` object returned by this function has the following properties and\nmethods:\n\n* `length()` - A function returning the number of items waiting to be processed.\n* `payload` - An `integer` for determining how many tasks should be\n process per round. This property can be changed after a `cargo` is created to\n alter the payload on-the-fly.\n* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called\n once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` \n can be submitted. The respective callback is used for every task in the list.\n* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.\n* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running the functions in `tasks`, based on their \nrequirements. Each function can optionally depend on other functions being completed \nfirst, and each function is run as soon as its requirements are satisfied. \n\nIf any of the functions pass an error to their callback, it will not \ncomplete (so any other functions depending on it will not run), and the main \n`callback` is immediately called with the error. Functions also receive an \nobject containing the results of functions which have completed so far.\n\nNote, all functions are called with a `results` object as a second argument, \nso it is unsafe to pass functions in the `tasks` object which cannot handle the\nextra argument. \n\nFor example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling `readFile` with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to `readFile` in a function which does not forward the \n`results` object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* `tasks` - An object. Each of its properties is either a function or an array of\n requirements, with the function itself the last item in the array. The object's key\n of a property serves as the name of the task defined by that property,\n i.e. can be used when specifying requirements for other tasks.\n The function receives two arguments: (1) a `callback(err, result)` which must be \n called when finished, passing an `error` (which can be `null`) and the result of \n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions.\n* `callback(err, results)` - An optional callback which is called when all the\n tasks have been completed. It receives the `err` argument if any `tasks` \n pass an error to their callback. Results are always returned; however, if \n an error occurs, no further `tasks` will be performed, and the results\n object will only contain partial results.\n\n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n make_folder: function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n },\n write_file: ['get_data', 'make_folder', function(callback, results){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, 'filename');\n }],\n email_link: ['write_file', function(callback, results){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n callback(null, {'file':results.write_file, 'email':'user@example.com'});\n }]\n}, function(err, results) {\n console.log('err = ', err);\n console.log('results = ', results);\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n results.push('filename');\n callback(null);\n },\n function(callback){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n callback(null, {'file':results.pop(), 'email':'user@example.com'});\n }\n ]);\n});\n```\n\nFor a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding\nnew tasks much easier (and the code more readable).\n\n\n---------------------------------------\n\n<a name=\"retry\" />\n### retry([times = 5], task, [callback])\n\nAttempts to get a successful response from `task` no more than `times` times before\nreturning an error. If the task is successful, the `callback` will be passed the result\nof the successfull task. If all attemps fail, the callback will be passed the error and\nresult (if any) of the final attempt.\n\n__Arguments__\n\n* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5.\n* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`\n which must be called when finished, passing `err` (which can be `null`) and the `result` of \n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions (if nested inside another control flow).\n* `callback(err, results)` - An optional callback which is called when the\n task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.\n\nThe [`retry`](#retry) function can be used as a stand-alone control flow by passing a\ncallback, as shown below:\n\n```js\nasync.retry(3, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\nIt can also be embeded within other control flow functions to retry individual methods\nthat are not as reliable, like this:\n\n```js\nasync.auto({\n users: api.getUsers.bind(api),\n payments: async.retry(3, api.getPayments.bind(api))\n}, function(err, results) {\n // do something with the results\n});\n```\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the `tasks` array,\nreturning a continuation to call the next one after that. It's also possible to\n“peek” at the next iterator with `iterator.next()`.\n\nThis function is used internally by the `async` module, but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* `tasks` - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied. \n\nUseful as a shorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls `callback` on a later loop around the event loop. In Node.js this just\ncalls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`\nif available, otherwise `setTimeout(callback, 0)`, which means other higher priority\nevents may precede the execution of `callback`.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* `callback` - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the `callback` function `n` times, and accumulates results in the same manner\nyou would use with [`map`](#map).\n\n__Arguments__\n\n* `n` - The number of times to run the function.\n* `callback` - The function to call `n` times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as [`times`](#times), only the iterator is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an `async` function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* `fn` - The function to proxy and cache results from.\n* `hasher` - Tn optional function for generating a custom hash for storing\n results. It has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized\nform. Handy for testing.\n\n__Arguments__\n\n* `fn` - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an `async` function to the `console`. Only works in Node.js or\nin browsers that support `console.log` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.log` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an `async` function to the `console` using `console.dir` to\ndisplay the properties of the resulting object. Only works in Node.js or\nin browsers that support `console.dir` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.dir` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of `async` back to its original value, returning a reference to the\n`async` object.\n",
39
+ "readmeFilename": "README.md",
40
+ "homepage": "https://github.com/caolan/async",
41
+ "_id": "async@0.9.0",
42
+ "_shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7",
43
+ "_from": "async@>=0.1.22",
44
+ "_resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
45
+ }
@@ -0,0 +1,4 @@
1
+ language: node_js
2
+ node_js:
3
+ - 0.10
4
+ - 0.11
@@ -0,0 +1,27 @@
1
+ Copyright (c) Isaac Z. Schlueter ("Author")
2
+ All rights reserved.
3
+
4
+ The BSD License
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions
8
+ are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright
11
+ notice, this list of conditions and the following disclaimer.
12
+
13
+ 2. Redistributions in binary form must reproduce the above copyright
14
+ notice, this list of conditions and the following disclaimer in the
15
+ documentation and/or other materials provided with the distribution.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
21
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,250 @@
1
+ # Glob
2
+
3
+ Match files using the patterns the shell uses, like stars and stuff.
4
+
5
+ This is a glob implementation in JavaScript. It uses the `minimatch`
6
+ library to do its matching.
7
+
8
+ ## Attention: node-glob users!
9
+
10
+ The API has changed dramatically between 2.x and 3.x. This library is
11
+ now 100% JavaScript, and the integer flags have been replaced with an
12
+ options object.
13
+
14
+ Also, there's an event emitter class, proper tests, and all the other
15
+ things you've come to expect from node modules.
16
+
17
+ And best of all, no compilation!
18
+
19
+ ## Usage
20
+
21
+ ```javascript
22
+ var glob = require("glob")
23
+
24
+ // options is optional
25
+ glob("**/*.js", options, function (er, files) {
26
+ // files is an array of filenames.
27
+ // If the `nonull` option is set, and nothing
28
+ // was found, then files is ["**/*.js"]
29
+ // er is an error object or null.
30
+ })
31
+ ```
32
+
33
+ ## Features
34
+
35
+ Please see the [minimatch
36
+ documentation](https://github.com/isaacs/minimatch) for more details.
37
+
38
+ Supports these glob features:
39
+
40
+ * Brace Expansion
41
+ * Extended glob matching
42
+ * "Globstar" `**` matching
43
+
44
+ See:
45
+
46
+ * `man sh`
47
+ * `man bash`
48
+ * `man 3 fnmatch`
49
+ * `man 5 gitignore`
50
+ * [minimatch documentation](https://github.com/isaacs/minimatch)
51
+
52
+ ## glob(pattern, [options], cb)
53
+
54
+ * `pattern` {String} Pattern to be matched
55
+ * `options` {Object}
56
+ * `cb` {Function}
57
+ * `err` {Error | null}
58
+ * `matches` {Array<String>} filenames found matching the pattern
59
+
60
+ Perform an asynchronous glob search.
61
+
62
+ ## glob.sync(pattern, [options])
63
+
64
+ * `pattern` {String} Pattern to be matched
65
+ * `options` {Object}
66
+ * return: {Array<String>} filenames found matching the pattern
67
+
68
+ Perform a synchronous glob search.
69
+
70
+ ## Class: glob.Glob
71
+
72
+ Create a Glob object by instanting the `glob.Glob` class.
73
+
74
+ ```javascript
75
+ var Glob = require("glob").Glob
76
+ var mg = new Glob(pattern, options, cb)
77
+ ```
78
+
79
+ It's an EventEmitter, and starts walking the filesystem to find matches
80
+ immediately.
81
+
82
+ ### new glob.Glob(pattern, [options], [cb])
83
+
84
+ * `pattern` {String} pattern to search for
85
+ * `options` {Object}
86
+ * `cb` {Function} Called when an error occurs, or matches are found
87
+ * `err` {Error | null}
88
+ * `matches` {Array<String>} filenames found matching the pattern
89
+
90
+ Note that if the `sync` flag is set in the options, then matches will
91
+ be immediately available on the `g.found` member.
92
+
93
+ ### Properties
94
+
95
+ * `minimatch` The minimatch object that the glob uses.
96
+ * `options` The options object passed in.
97
+ * `error` The error encountered. When an error is encountered, the
98
+ glob object is in an undefined state, and should be discarded.
99
+ * `aborted` Boolean which is set to true when calling `abort()`. There
100
+ is no way at this time to continue a glob search after aborting, but
101
+ you can re-use the statCache to avoid having to duplicate syscalls.
102
+ * `statCache` Collection of all the stat results the glob search
103
+ performed.
104
+ * `cache` Convenience object. Each field has the following possible
105
+ values:
106
+ * `false` - Path does not exist
107
+ * `true` - Path exists
108
+ * `1` - Path exists, and is not a directory
109
+ * `2` - Path exists, and is a directory
110
+ * `[file, entries, ...]` - Path exists, is a directory, and the
111
+ array value is the results of `fs.readdir`
112
+
113
+ ### Events
114
+
115
+ * `end` When the matching is finished, this is emitted with all the
116
+ matches found. If the `nonull` option is set, and no match was found,
117
+ then the `matches` list contains the original pattern. The matches
118
+ are sorted, unless the `nosort` flag is set.
119
+ * `match` Every time a match is found, this is emitted with the matched.
120
+ * `error` Emitted when an unexpected error is encountered, or whenever
121
+ any fs error occurs if `options.strict` is set.
122
+ * `abort` When `abort()` is called, this event is raised.
123
+
124
+ ### Methods
125
+
126
+ * `abort` Stop the search.
127
+
128
+ ### Options
129
+
130
+ All the options that can be passed to Minimatch can also be passed to
131
+ Glob to change pattern matching behavior. Also, some have been added,
132
+ or have glob-specific ramifications.
133
+
134
+ All options are false by default, unless otherwise noted.
135
+
136
+ All options are added to the glob object, as well.
137
+
138
+ * `cwd` The current working directory in which to search. Defaults
139
+ to `process.cwd()`.
140
+ * `root` The place where patterns starting with `/` will be mounted
141
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
142
+ systems, and `C:\` or some such on Windows.)
143
+ * `dot` Include `.dot` files in normal matches and `globstar` matches.
144
+ Note that an explicit dot in a portion of the pattern will always
145
+ match dot files.
146
+ * `nomount` By default, a pattern starting with a forward-slash will be
147
+ "mounted" onto the root setting, so that a valid filesystem path is
148
+ returned. Set this flag to disable that behavior.
149
+ * `mark` Add a `/` character to directory matches. Note that this
150
+ requires additional stat calls.
151
+ * `nosort` Don't sort the results.
152
+ * `stat` Set to true to stat *all* results. This reduces performance
153
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
154
+ to be an untrustworthy indicator of file existence. It will cause
155
+ ELOOP to be triggered one level sooner in the case of cyclical
156
+ symbolic links.
157
+ * `silent` When an unusual error is encountered
158
+ when attempting to read a directory, a warning will be printed to
159
+ stderr. Set the `silent` option to true to suppress these warnings.
160
+ * `strict` When an unusual error is encountered
161
+ when attempting to read a directory, the process will just continue on
162
+ in search of other matches. Set the `strict` option to raise an error
163
+ in these cases.
164
+ * `cache` See `cache` property above. Pass in a previously generated
165
+ cache object to save some fs calls.
166
+ * `statCache` A cache of results of filesystem information, to prevent
167
+ unnecessary stat calls. While it should not normally be necessary to
168
+ set this, you may pass the statCache from one glob() call to the
169
+ options object of another, if you know that the filesystem will not
170
+ change between calls. (See "Race Conditions" below.)
171
+ * `sync` Perform a synchronous glob search.
172
+ * `nounique` In some cases, brace-expanded patterns can result in the
173
+ same file showing up multiple times in the result set. By default,
174
+ this implementation prevents duplicates in the result set.
175
+ Set this flag to disable that behavior.
176
+ * `nonull` Set to never return an empty set, instead returning a set
177
+ containing the pattern itself. This is the default in glob(3).
178
+ * `nocase` Perform a case-insensitive match. Note that case-insensitive
179
+ filesystems will sometimes result in glob returning results that are
180
+ case-insensitively matched anyway, since readdir and stat will not
181
+ raise an error.
182
+ * `debug` Set to enable debug logging in minimatch and glob.
183
+ * `globDebug` Set to enable debug logging in glob, but not minimatch.
184
+
185
+ ## Comparisons to other fnmatch/glob implementations
186
+
187
+ While strict compliance with the existing standards is a worthwhile
188
+ goal, some discrepancies exist between node-glob and other
189
+ implementations, and are intentional.
190
+
191
+ If the pattern starts with a `!` character, then it is negated. Set the
192
+ `nonegate` flag to suppress this behavior, and treat leading `!`
193
+ characters normally. This is perhaps relevant if you wish to start the
194
+ pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
195
+ characters at the start of a pattern will negate the pattern multiple
196
+ times.
197
+
198
+ If a pattern starts with `#`, then it is treated as a comment, and
199
+ will not match anything. Use `\#` to match a literal `#` at the
200
+ start of a line, or set the `nocomment` flag to suppress this behavior.
201
+
202
+ The double-star character `**` is supported by default, unless the
203
+ `noglobstar` flag is set. This is supported in the manner of bsdglob
204
+ and bash 4.1, where `**` only has special significance if it is the only
205
+ thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
206
+ `a/**b` will not.
207
+
208
+ If an escaped pattern has no matches, and the `nonull` flag is set,
209
+ then glob returns the pattern as-provided, rather than
210
+ interpreting the character escapes. For example,
211
+ `glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
212
+ `"*a?"`. This is akin to setting the `nullglob` option in bash, except
213
+ that it does not resolve escaped pattern characters.
214
+
215
+ If brace expansion is not disabled, then it is performed before any
216
+ other interpretation of the glob pattern. Thus, a pattern like
217
+ `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
218
+ **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
219
+ checked for validity. Since those two are valid, matching proceeds.
220
+
221
+ ## Windows
222
+
223
+ **Please only use forward-slashes in glob expressions.**
224
+
225
+ Though windows uses either `/` or `\` as its path separator, only `/`
226
+ characters are used by this glob implementation. You must use
227
+ forward-slashes **only** in glob expressions. Back-slashes will always
228
+ be interpreted as escape characters, not path separators.
229
+
230
+ Results from absolute patterns such as `/foo/*` are mounted onto the
231
+ root setting using `path.join`. On windows, this will by default result
232
+ in `/foo/*` matching `C:\foo\bar.txt`.
233
+
234
+ ## Race Conditions
235
+
236
+ Glob searching, by its very nature, is susceptible to race conditions,
237
+ since it relies on directory walking and such.
238
+
239
+ As a result, it is possible that a file that exists when glob looks for
240
+ it may have been deleted or modified by the time it returns the result.
241
+
242
+ As part of its internal implementation, this program caches all stat
243
+ and readdir calls that it makes, in order to cut down on system
244
+ overhead. However, this also makes it even more susceptible to races,
245
+ especially if the cache or statCache objects are reused between glob
246
+ calls.
247
+
248
+ Users are thus advised not to use a glob result as a guarantee of
249
+ filesystem state in the face of rapid changes. For the vast majority
250
+ of operations, this is never a problem.
@@ -0,0 +1,9 @@
1
+ var Glob = require("../").Glob
2
+
3
+ var pattern = "test/a/**/[cg]/../[cg]"
4
+ console.log(pattern)
5
+
6
+ var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
7
+ console.log("matches", matches)
8
+ })
9
+ console.log("after")
@@ -0,0 +1,9 @@
1
+ var Glob = require("../").Glob
2
+
3
+ var pattern = "{./*/*,/*,/usr/local/*}"
4
+ console.log(pattern)
5
+
6
+ var mg = new Glob(pattern, {mark: true}, function (er, matches) {
7
+ console.log("matches", matches)
8
+ })
9
+ console.log("after")
@@ -0,0 +1,738 @@
1
+ // Approach:
2
+ //
3
+ // 1. Get the minimatch set
4
+ // 2. For each pattern in the set, PROCESS(pattern)
5
+ // 3. Store matches per-set, then uniq them
6
+ //
7
+ // PROCESS(pattern)
8
+ // Get the first [n] items from pattern that are all strings
9
+ // Join these together. This is PREFIX.
10
+ // If there is no more remaining, then stat(PREFIX) and
11
+ // add to matches if it succeeds. END.
12
+ // readdir(PREFIX) as ENTRIES
13
+ // If fails, END
14
+ // If pattern[n] is GLOBSTAR
15
+ // // handle the case where the globstar match is empty
16
+ // // by pruning it out, and testing the resulting pattern
17
+ // PROCESS(pattern[0..n] + pattern[n+1 .. $])
18
+ // // handle other cases.
19
+ // for ENTRY in ENTRIES (not dotfiles)
20
+ // // attach globstar + tail onto the entry
21
+ // PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
22
+ //
23
+ // else // not globstar
24
+ // for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
25
+ // Test ENTRY against pattern[n]
26
+ // If fails, continue
27
+ // If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
28
+ //
29
+ // Caveat:
30
+ // Cache all stats and readdirs results to minimize syscall. Since all
31
+ // we ever care about is existence and directory-ness, we can just keep
32
+ // `true` for files, and [children,...] for directories, or `false` for
33
+ // things that don't exist.
34
+
35
+
36
+
37
+ module.exports = glob
38
+
39
+ var fs = require("fs")
40
+ , minimatch = require("minimatch")
41
+ , Minimatch = minimatch.Minimatch
42
+ , inherits = require("inherits")
43
+ , EE = require("events").EventEmitter
44
+ , path = require("path")
45
+ , isDir = {}
46
+ , assert = require("assert").ok
47
+ , once = require("once")
48
+
49
+ function glob (pattern, options, cb) {
50
+ if (typeof options === "function") cb = options, options = {}
51
+ if (!options) options = {}
52
+
53
+ if (typeof options === "number") {
54
+ deprecated()
55
+ return
56
+ }
57
+
58
+ var g = new Glob(pattern, options, cb)
59
+ return g.sync ? g.found : g
60
+ }
61
+
62
+ glob.fnmatch = deprecated
63
+
64
+ function deprecated () {
65
+ throw new Error("glob's interface has changed. Please see the docs.")
66
+ }
67
+
68
+ glob.sync = globSync
69
+ function globSync (pattern, options) {
70
+ if (typeof options === "number") {
71
+ deprecated()
72
+ return
73
+ }
74
+
75
+ options = options || {}
76
+ options.sync = true
77
+ return glob(pattern, options)
78
+ }
79
+
80
+ this._processingEmitQueue = false
81
+
82
+ glob.Glob = Glob
83
+ inherits(Glob, EE)
84
+ function Glob (pattern, options, cb) {
85
+ if (!(this instanceof Glob)) {
86
+ return new Glob(pattern, options, cb)
87
+ }
88
+
89
+ if (typeof options === "function") {
90
+ cb = options
91
+ options = null
92
+ }
93
+
94
+ if (typeof cb === "function") {
95
+ cb = once(cb)
96
+ this.on("error", cb)
97
+ this.on("end", function (matches) {
98
+ cb(null, matches)
99
+ })
100
+ }
101
+
102
+ options = options || {}
103
+
104
+ this._endEmitted = false
105
+ this.EOF = {}
106
+ this._emitQueue = []
107
+
108
+ this.paused = false
109
+ this._processingEmitQueue = false
110
+
111
+ this.maxDepth = options.maxDepth || 1000
112
+ this.maxLength = options.maxLength || Infinity
113
+ this.cache = options.cache || {}
114
+ this.statCache = options.statCache || {}
115
+
116
+ this.changedCwd = false
117
+ var cwd = process.cwd()
118
+ if (!options.hasOwnProperty("cwd")) this.cwd = cwd
119
+ else {
120
+ this.cwd = options.cwd
121
+ this.changedCwd = path.resolve(options.cwd) !== cwd
122
+ }
123
+
124
+ this.root = options.root || path.resolve(this.cwd, "/")
125
+ this.root = path.resolve(this.root)
126
+ if (process.platform === "win32")
127
+ this.root = this.root.replace(/\\/g, "/")
128
+
129
+ this.nomount = !!options.nomount
130
+
131
+ if (!pattern) {
132
+ throw new Error("must provide pattern")
133
+ }
134
+
135
+ // base-matching: just use globstar for that.
136
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
137
+ if (options.noglobstar) {
138
+ throw new Error("base matching requires globstar")
139
+ }
140
+ pattern = "**/" + pattern
141
+ }
142
+
143
+ this.strict = options.strict !== false
144
+ this.dot = !!options.dot
145
+ this.mark = !!options.mark
146
+ this.sync = !!options.sync
147
+ this.nounique = !!options.nounique
148
+ this.nonull = !!options.nonull
149
+ this.nosort = !!options.nosort
150
+ this.nocase = !!options.nocase
151
+ this.stat = !!options.stat
152
+
153
+ this.debug = !!options.debug || !!options.globDebug
154
+
155
+ if (/\bglob\b/.test(process.env.NODE_DEBUG || ''))
156
+ this.debug = true
157
+
158
+ if (this.debug)
159
+ this.log = console.error
160
+
161
+ this.silent = !!options.silent
162
+
163
+ var mm = this.minimatch = new Minimatch(pattern, options)
164
+ this.options = mm.options
165
+ pattern = this.pattern = mm.pattern
166
+
167
+ this.error = null
168
+ this.aborted = false
169
+
170
+ // list of all the patterns that ** has resolved do, so
171
+ // we can avoid visiting multiple times.
172
+ this._globstars = {}
173
+
174
+ EE.call(this)
175
+
176
+ // process each pattern in the minimatch set
177
+ var n = this.minimatch.set.length
178
+
179
+ // The matches are stored as {<filename>: true,...} so that
180
+ // duplicates are automagically pruned.
181
+ // Later, we do an Object.keys() on these.
182
+ // Keep them as a list so we can fill in when nonull is set.
183
+ this.matches = new Array(n)
184
+
185
+ if (this.minimatch.set.length === 0) {
186
+ return process.nextTick(this._finish.bind(this))
187
+ }
188
+
189
+ this.minimatch.set.forEach(iterator.bind(this))
190
+ function iterator (pattern, i, set) {
191
+ this._process(pattern, 0, i, function (er) {
192
+ if (er) this.emit("error", er)
193
+ if (-- n <= 0) this._finish()
194
+ })
195
+ }
196
+ }
197
+
198
+ Glob.prototype.log = function () {}
199
+
200
+ Glob.prototype._finish = function () {
201
+ assert(this instanceof Glob)
202
+
203
+ var nou = this.nounique
204
+ , all = nou ? [] : {}
205
+
206
+ for (var i = 0, l = this.matches.length; i < l; i ++) {
207
+ var matches = this.matches[i]
208
+ this.log("matches[%d] =", i, matches)
209
+ // do like the shell, and spit out the literal glob
210
+ if (!matches) {
211
+ if (this.nonull) {
212
+ var literal = this.minimatch.globSet[i]
213
+ if (nou) all.push(literal)
214
+ else all[literal] = true
215
+ }
216
+ } else {
217
+ // had matches
218
+ var m = Object.keys(matches)
219
+ if (nou) all.push.apply(all, m)
220
+ else m.forEach(function (m) {
221
+ all[m] = true
222
+ })
223
+ }
224
+ }
225
+
226
+ if (!nou) all = Object.keys(all)
227
+
228
+ if (!this.nosort) {
229
+ all = all.sort(this.nocase ? alphasorti : alphasort)
230
+ }
231
+
232
+ if (this.mark) {
233
+ // at *some* point we statted all of these
234
+ all = all.map(this._mark, this)
235
+ }
236
+
237
+ this.log("emitting end", all)
238
+
239
+ this.EOF = this.found = all
240
+ this.emitMatch(this.EOF)
241
+ }
242
+
243
+ function alphasorti (a, b) {
244
+ a = a.toLowerCase()
245
+ b = b.toLowerCase()
246
+ return alphasort(a, b)
247
+ }
248
+
249
+ function alphasort (a, b) {
250
+ return a > b ? 1 : a < b ? -1 : 0
251
+ }
252
+
253
+ Glob.prototype._mark = function (p) {
254
+ var c = this.cache[p]
255
+ var m = p
256
+ if (c) {
257
+ var isDir = c === 2 || Array.isArray(c)
258
+ var slash = p.slice(-1) === '/'
259
+
260
+ if (isDir && !slash)
261
+ m += '/'
262
+ else if (!isDir && slash)
263
+ m = m.slice(0, -1)
264
+
265
+ if (m !== p) {
266
+ this.statCache[m] = this.statCache[p]
267
+ this.cache[m] = this.cache[p]
268
+ }
269
+ }
270
+
271
+ return m
272
+ }
273
+
274
+ Glob.prototype.abort = function () {
275
+ this.aborted = true
276
+ this.emit("abort")
277
+ }
278
+
279
+ Glob.prototype.pause = function () {
280
+ if (this.paused) return
281
+ if (this.sync)
282
+ this.emit("error", new Error("Can't pause/resume sync glob"))
283
+ this.paused = true
284
+ this.emit("pause")
285
+ }
286
+
287
+ Glob.prototype.resume = function () {
288
+ if (!this.paused) return
289
+ if (this.sync)
290
+ this.emit("error", new Error("Can't pause/resume sync glob"))
291
+ this.paused = false
292
+ this.emit("resume")
293
+ this._processEmitQueue()
294
+ //process.nextTick(this.emit.bind(this, "resume"))
295
+ }
296
+
297
+ Glob.prototype.emitMatch = function (m) {
298
+ this.log('emitMatch', m)
299
+ this._emitQueue.push(m)
300
+ this._processEmitQueue()
301
+ }
302
+
303
+ Glob.prototype._processEmitQueue = function (m) {
304
+ this.log("pEQ paused=%j processing=%j m=%j", this.paused,
305
+ this._processingEmitQueue, m)
306
+ var done = false
307
+ while (!this._processingEmitQueue &&
308
+ !this.paused) {
309
+ this._processingEmitQueue = true
310
+ var m = this._emitQueue.shift()
311
+ this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m)
312
+ if (!m) {
313
+ this.log(">processEmitQueue, falsey m")
314
+ this._processingEmitQueue = false
315
+ break
316
+ }
317
+
318
+ if (m === this.EOF || !(this.mark && !this.stat)) {
319
+ this.log("peq: unmarked, or eof")
320
+ next.call(this, 0, false)
321
+ } else if (this.statCache[m]) {
322
+ var sc = this.statCache[m]
323
+ var exists
324
+ if (sc)
325
+ exists = sc.isDirectory() ? 2 : 1
326
+ this.log("peq: stat cached")
327
+ next.call(this, exists, exists === 2)
328
+ } else {
329
+ this.log("peq: _stat, then next")
330
+ this._stat(m, next)
331
+ }
332
+
333
+ function next(exists, isDir) {
334
+ this.log("next", m, exists, isDir)
335
+ var ev = m === this.EOF ? "end" : "match"
336
+
337
+ // "end" can only happen once.
338
+ assert(!this._endEmitted)
339
+ if (ev === "end")
340
+ this._endEmitted = true
341
+
342
+ if (exists) {
343
+ // Doesn't mean it necessarily doesn't exist, it's possible
344
+ // we just didn't check because we don't care that much, or
345
+ // this is EOF anyway.
346
+ if (isDir && !m.match(/\/$/)) {
347
+ m = m + "/"
348
+ } else if (!isDir && m.match(/\/$/)) {
349
+ m = m.replace(/\/+$/, "")
350
+ }
351
+ }
352
+ this.log("emit", ev, m)
353
+ this.emit(ev, m)
354
+ this._processingEmitQueue = false
355
+ if (done && m !== this.EOF && !this.paused)
356
+ this._processEmitQueue()
357
+ }
358
+ }
359
+ done = true
360
+ }
361
+
362
+ Glob.prototype._process = function (pattern, depth, index, cb_) {
363
+ assert(this instanceof Glob)
364
+
365
+ var cb = function cb (er, res) {
366
+ assert(this instanceof Glob)
367
+ if (this.paused) {
368
+ if (!this._processQueue) {
369
+ this._processQueue = []
370
+ this.once("resume", function () {
371
+ var q = this._processQueue
372
+ this._processQueue = null
373
+ q.forEach(function (cb) { cb() })
374
+ })
375
+ }
376
+ this._processQueue.push(cb_.bind(this, er, res))
377
+ } else {
378
+ cb_.call(this, er, res)
379
+ }
380
+ }.bind(this)
381
+
382
+ if (this.aborted) return cb()
383
+
384
+ if (depth > this.maxDepth) return cb()
385
+
386
+ // Get the first [n] parts of pattern that are all strings.
387
+ var n = 0
388
+ while (typeof pattern[n] === "string") {
389
+ n ++
390
+ }
391
+ // now n is the index of the first one that is *not* a string.
392
+
393
+ // see if there's anything else
394
+ var prefix
395
+ switch (n) {
396
+ // if not, then this is rather simple
397
+ case pattern.length:
398
+ prefix = pattern.join("/")
399
+ this._stat(prefix, function (exists, isDir) {
400
+ // either it's there, or it isn't.
401
+ // nothing more to do, either way.
402
+ if (exists) {
403
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
404
+ if (prefix.charAt(0) === "/") {
405
+ prefix = path.join(this.root, prefix)
406
+ } else {
407
+ prefix = path.resolve(this.root, prefix)
408
+ }
409
+ }
410
+
411
+ if (process.platform === "win32")
412
+ prefix = prefix.replace(/\\/g, "/")
413
+
414
+ this.matches[index] = this.matches[index] || {}
415
+ this.matches[index][prefix] = true
416
+ this.emitMatch(prefix)
417
+ }
418
+ return cb()
419
+ })
420
+ return
421
+
422
+ case 0:
423
+ // pattern *starts* with some non-trivial item.
424
+ // going to readdir(cwd), but not include the prefix in matches.
425
+ prefix = null
426
+ break
427
+
428
+ default:
429
+ // pattern has some string bits in the front.
430
+ // whatever it starts with, whether that's "absolute" like /foo/bar,
431
+ // or "relative" like "../baz"
432
+ prefix = pattern.slice(0, n)
433
+ prefix = prefix.join("/")
434
+ break
435
+ }
436
+
437
+ // get the list of entries.
438
+ var read
439
+ if (prefix === null) read = "."
440
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
441
+ if (!prefix || !isAbsolute(prefix)) {
442
+ prefix = "/" + prefix
443
+ }
444
+ read = prefix
445
+
446
+ // if (process.platform === "win32")
447
+ // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
448
+
449
+ this.log('absolute: ', prefix, this.root, pattern, read)
450
+ } else {
451
+ read = prefix
452
+ }
453
+
454
+ this.log('readdir(%j)', read, this.cwd, this.root)
455
+
456
+ return this._readdir(read, function (er, entries) {
457
+ if (er) {
458
+ // not a directory!
459
+ // this means that, whatever else comes after this, it can never match
460
+ return cb()
461
+ }
462
+
463
+ // globstar is special
464
+ if (pattern[n] === minimatch.GLOBSTAR) {
465
+ // test without the globstar, and with every child both below
466
+ // and replacing the globstar.
467
+ var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
468
+ entries.forEach(function (e) {
469
+ if (e.charAt(0) === "." && !this.dot) return
470
+ // instead of the globstar
471
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
472
+ // below the globstar
473
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
474
+ }, this)
475
+
476
+ s = s.filter(function (pattern) {
477
+ var key = gsKey(pattern)
478
+ var seen = !this._globstars[key]
479
+ this._globstars[key] = true
480
+ return seen
481
+ }, this)
482
+
483
+ if (!s.length)
484
+ return cb()
485
+
486
+ // now asyncForEach over this
487
+ var l = s.length
488
+ , errState = null
489
+ s.forEach(function (gsPattern) {
490
+ this._process(gsPattern, depth + 1, index, function (er) {
491
+ if (errState) return
492
+ if (er) return cb(errState = er)
493
+ if (--l <= 0) return cb()
494
+ })
495
+ }, this)
496
+
497
+ return
498
+ }
499
+
500
+ // not a globstar
501
+ // It will only match dot entries if it starts with a dot, or if
502
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
503
+ var pn = pattern[n]
504
+ var rawGlob = pattern[n]._glob
505
+ , dotOk = this.dot || rawGlob.charAt(0) === "."
506
+
507
+ entries = entries.filter(function (e) {
508
+ return (e.charAt(0) !== "." || dotOk) &&
509
+ e.match(pattern[n])
510
+ })
511
+
512
+ // If n === pattern.length - 1, then there's no need for the extra stat
513
+ // *unless* the user has specified "mark" or "stat" explicitly.
514
+ // We know that they exist, since the readdir returned them.
515
+ if (n === pattern.length - 1 &&
516
+ !this.mark &&
517
+ !this.stat) {
518
+ entries.forEach(function (e) {
519
+ if (prefix) {
520
+ if (prefix !== "/") e = prefix + "/" + e
521
+ else e = prefix + e
522
+ }
523
+ if (e.charAt(0) === "/" && !this.nomount) {
524
+ e = path.join(this.root, e)
525
+ }
526
+
527
+ if (process.platform === "win32")
528
+ e = e.replace(/\\/g, "/")
529
+
530
+ this.matches[index] = this.matches[index] || {}
531
+ this.matches[index][e] = true
532
+ this.emitMatch(e)
533
+ }, this)
534
+ return cb.call(this)
535
+ }
536
+
537
+
538
+ // now test all the remaining entries as stand-ins for that part
539
+ // of the pattern.
540
+ var l = entries.length
541
+ , errState = null
542
+ if (l === 0) return cb() // no matches possible
543
+ entries.forEach(function (e) {
544
+ var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
545
+ this._process(p, depth + 1, index, function (er) {
546
+ if (errState) return
547
+ if (er) return cb(errState = er)
548
+ if (--l === 0) return cb.call(this)
549
+ })
550
+ }, this)
551
+ })
552
+
553
+ }
554
+
555
+ function gsKey (pattern) {
556
+ return '**' + pattern.map(function (p) {
557
+ return (p === minimatch.GLOBSTAR) ? '**' : (''+p)
558
+ }).join('/')
559
+ }
560
+
561
+ Glob.prototype._stat = function (f, cb) {
562
+ assert(this instanceof Glob)
563
+ var abs = f
564
+ if (f.charAt(0) === "/") {
565
+ abs = path.join(this.root, f)
566
+ } else if (this.changedCwd) {
567
+ abs = path.resolve(this.cwd, f)
568
+ }
569
+
570
+ if (f.length > this.maxLength) {
571
+ var er = new Error("Path name too long")
572
+ er.code = "ENAMETOOLONG"
573
+ er.path = f
574
+ return this._afterStat(f, abs, cb, er)
575
+ }
576
+
577
+ this.log('stat', [this.cwd, f, '=', abs])
578
+
579
+ if (!this.stat && this.cache.hasOwnProperty(f)) {
580
+ var exists = this.cache[f]
581
+ , isDir = exists && (Array.isArray(exists) || exists === 2)
582
+ if (this.sync) return cb.call(this, !!exists, isDir)
583
+ return process.nextTick(cb.bind(this, !!exists, isDir))
584
+ }
585
+
586
+ var stat = this.statCache[abs]
587
+ if (this.sync || stat) {
588
+ var er
589
+ try {
590
+ stat = fs.statSync(abs)
591
+ } catch (e) {
592
+ er = e
593
+ }
594
+ this._afterStat(f, abs, cb, er, stat)
595
+ } else {
596
+ fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
597
+ }
598
+ }
599
+
600
+ Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
601
+ var exists
602
+ assert(this instanceof Glob)
603
+
604
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
605
+ this.log("should be ENOTDIR, fake it")
606
+
607
+ er = new Error("ENOTDIR, not a directory '" + abs + "'")
608
+ er.path = abs
609
+ er.code = "ENOTDIR"
610
+ stat = null
611
+ }
612
+
613
+ var emit = !this.statCache[abs]
614
+ this.statCache[abs] = stat
615
+
616
+ if (er || !stat) {
617
+ exists = false
618
+ } else {
619
+ exists = stat.isDirectory() ? 2 : 1
620
+ if (emit)
621
+ this.emit('stat', f, stat)
622
+ }
623
+ this.cache[f] = this.cache[f] || exists
624
+ cb.call(this, !!exists, exists === 2)
625
+ }
626
+
627
+ Glob.prototype._readdir = function (f, cb) {
628
+ assert(this instanceof Glob)
629
+ var abs = f
630
+ if (f.charAt(0) === "/") {
631
+ abs = path.join(this.root, f)
632
+ } else if (isAbsolute(f)) {
633
+ abs = f
634
+ } else if (this.changedCwd) {
635
+ abs = path.resolve(this.cwd, f)
636
+ }
637
+
638
+ if (f.length > this.maxLength) {
639
+ var er = new Error("Path name too long")
640
+ er.code = "ENAMETOOLONG"
641
+ er.path = f
642
+ return this._afterReaddir(f, abs, cb, er)
643
+ }
644
+
645
+ this.log('readdir', [this.cwd, f, abs])
646
+ if (this.cache.hasOwnProperty(f)) {
647
+ var c = this.cache[f]
648
+ if (Array.isArray(c)) {
649
+ if (this.sync) return cb.call(this, null, c)
650
+ return process.nextTick(cb.bind(this, null, c))
651
+ }
652
+
653
+ if (!c || c === 1) {
654
+ // either ENOENT or ENOTDIR
655
+ var code = c ? "ENOTDIR" : "ENOENT"
656
+ , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
657
+ er.path = f
658
+ er.code = code
659
+ this.log(f, er)
660
+ if (this.sync) return cb.call(this, er)
661
+ return process.nextTick(cb.bind(this, er))
662
+ }
663
+
664
+ // at this point, c === 2, meaning it's a dir, but we haven't
665
+ // had to read it yet, or c === true, meaning it's *something*
666
+ // but we don't have any idea what. Need to read it, either way.
667
+ }
668
+
669
+ if (this.sync) {
670
+ var er, entries
671
+ try {
672
+ entries = fs.readdirSync(abs)
673
+ } catch (e) {
674
+ er = e
675
+ }
676
+ return this._afterReaddir(f, abs, cb, er, entries)
677
+ }
678
+
679
+ fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
680
+ }
681
+
682
+ Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
683
+ assert(this instanceof Glob)
684
+ if (entries && !er) {
685
+ this.cache[f] = entries
686
+ // if we haven't asked to stat everything for suresies, then just
687
+ // assume that everything in there exists, so we can avoid
688
+ // having to stat it a second time. This also gets us one step
689
+ // further into ELOOP territory.
690
+ if (!this.mark && !this.stat) {
691
+ entries.forEach(function (e) {
692
+ if (f === "/") e = f + e
693
+ else e = f + "/" + e
694
+ this.cache[e] = true
695
+ }, this)
696
+ }
697
+
698
+ return cb.call(this, er, entries)
699
+ }
700
+
701
+ // now handle errors, and cache the information
702
+ if (er) switch (er.code) {
703
+ case "ENOTDIR": // totally normal. means it *does* exist.
704
+ this.cache[f] = 1
705
+ return cb.call(this, er)
706
+ case "ENOENT": // not terribly unusual
707
+ case "ELOOP":
708
+ case "ENAMETOOLONG":
709
+ case "UNKNOWN":
710
+ this.cache[f] = false
711
+ return cb.call(this, er)
712
+ default: // some unusual error. Treat as failure.
713
+ this.cache[f] = false
714
+ if (this.strict) this.emit("error", er)
715
+ if (!this.silent) console.error("glob error", er)
716
+ return cb.call(this, er)
717
+ }
718
+ }
719
+
720
+ var isAbsolute = process.platform === "win32" ? absWin : absUnix
721
+
722
+ function absWin (p) {
723
+ if (absUnix(p)) return true
724
+ // pull off the device/UNC bit from a windows path.
725
+ // from node's lib/path.js
726
+ var splitDeviceRe =
727
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
728
+ , result = splitDeviceRe.exec(p)
729
+ , device = result[1] || ''
730
+ , isUnc = device && device.charAt(1) !== ':'
731
+ , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
732
+
733
+ return isAbsolute
734
+ }
735
+
736
+ function absUnix (p) {
737
+ return p.charAt(0) === "/" || p === ""
738
+ }