traceur-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/js/compile.js +7 -15
- data/lib/traceur.rb +2 -1
- data/lib/traceur/compilation_error.rb +27 -0
- data/lib/traceur/compiler.rb +4 -1
- data/lib/traceur/configuration.rb +1 -1
- data/lib/traceur/node/runner.rb +1 -1
- data/lib/traceur/version.rb +1 -1
- data/spec/examples/syntax_error.js +3 -0
- data/spec/integration/examples_spec.rb +6 -0
- data/vendor/node_modules/traceur/LICENSE +202 -0
- data/vendor/node_modules/traceur/README.md +5 -5
- data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
- data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
- data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
- data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
- data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
- data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
- data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
- data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
- data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
- data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
- data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
- data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
- data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
- data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
- data/vendor/node_modules/traceur/package.json +234 -20
- data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
- data/vendor/node_modules/traceur/src/node/System.js +32 -5
- data/vendor/node_modules/traceur/src/node/api.js +28 -93
- data/vendor/node_modules/traceur/src/node/command.js +84 -19
- data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
- data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
- data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
- data/vendor/node_modules/traceur/src/node/require.js +7 -21
- data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
- data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
- data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
- data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
- metadata +196 -190
- data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
- data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
- data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
- data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
- data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
- data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
- data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
- data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
- data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
- data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
- data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
- data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
- data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
- data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
- data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "commander",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.6.0",
|
4
4
|
"description": "the complete solution for node.js command-line programs",
|
5
5
|
"keywords": [
|
6
6
|
"command",
|
7
7
|
"option",
|
8
8
|
"parser",
|
9
|
-
"prompt"
|
10
|
-
"stdin"
|
9
|
+
"prompt"
|
11
10
|
],
|
12
11
|
"author": {
|
13
12
|
"name": "TJ Holowaychuk",
|
14
13
|
"email": "tj@vision-media.ca"
|
15
14
|
},
|
15
|
+
"license": "MIT",
|
16
16
|
"repository": {
|
17
17
|
"type": "git",
|
18
|
-
"url": "https://github.com/
|
18
|
+
"url": "https://github.com/tj/commander.js.git"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"should": ">= 0.0.1"
|
@@ -30,11 +30,43 @@
|
|
30
30
|
"files": [
|
31
31
|
"index.js"
|
32
32
|
],
|
33
|
-
"
|
34
|
-
"readmeFilename": "Readme.md",
|
33
|
+
"gitHead": "c6807fd154dd3b7ce8756f141f8d3acfcc74be60",
|
35
34
|
"bugs": {
|
36
|
-
"url": "https://github.com/
|
35
|
+
"url": "https://github.com/tj/commander.js/issues"
|
37
36
|
},
|
38
|
-
"
|
39
|
-
"
|
37
|
+
"homepage": "https://github.com/tj/commander.js",
|
38
|
+
"_id": "commander@2.6.0",
|
39
|
+
"_shasum": "9df7e52fb2a0cb0fb89058ee80c3104225f37e1d",
|
40
|
+
"_from": "commander@>=2.0.0 <3.0.0",
|
41
|
+
"_npmVersion": "2.1.12",
|
42
|
+
"_nodeVersion": "0.11.14",
|
43
|
+
"_npmUser": {
|
44
|
+
"name": "zhiyelee",
|
45
|
+
"email": "zhiyelee@gmail.com"
|
46
|
+
},
|
47
|
+
"maintainers": [
|
48
|
+
{
|
49
|
+
"name": "tjholowaychuk",
|
50
|
+
"email": "tj@vision-media.ca"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"name": "somekittens",
|
54
|
+
"email": "rkoutnik@gmail.com"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "zhiyelee",
|
58
|
+
"email": "zhiyelee@gmail.com"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "thethomaseffect",
|
62
|
+
"email": "thethomaseffect@gmail.com"
|
63
|
+
}
|
64
|
+
],
|
65
|
+
"dist": {
|
66
|
+
"shasum": "9df7e52fb2a0cb0fb89058ee80c3104225f37e1d",
|
67
|
+
"tarball": "http://registry.npmjs.org/commander/-/commander-2.6.0.tgz"
|
68
|
+
},
|
69
|
+
"directories": {},
|
70
|
+
"_resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
|
71
|
+
"readme": "ERROR: No README data found!"
|
40
72
|
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
The ISC License
|
2
|
+
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
4
|
+
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
@@ -0,0 +1,357 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
|
2
|
+
|
3
|
+
# Glob
|
4
|
+
|
5
|
+
Match files using the patterns the shell uses, like stars and stuff.
|
6
|
+
|
7
|
+
This is a glob implementation in JavaScript. It uses the `minimatch`
|
8
|
+
library to do its matching.
|
9
|
+
|
10
|
+
![](oh-my-glob.gif)
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
```javascript
|
15
|
+
var glob = require("glob")
|
16
|
+
|
17
|
+
// options is optional
|
18
|
+
glob("**/*.js", options, function (er, files) {
|
19
|
+
// files is an array of filenames.
|
20
|
+
// If the `nonull` option is set, and nothing
|
21
|
+
// was found, then files is ["**/*.js"]
|
22
|
+
// er is an error object or null.
|
23
|
+
})
|
24
|
+
```
|
25
|
+
|
26
|
+
## Glob Primer
|
27
|
+
|
28
|
+
"Globs" are the patterns you type when you do stuff like `ls *.js` on
|
29
|
+
the command line, or put `build/*` in a `.gitignore` file.
|
30
|
+
|
31
|
+
Before parsing the path part patterns, braced sections are expanded
|
32
|
+
into a set. Braced sections start with `{` and end with `}`, with any
|
33
|
+
number of comma-delimited sections within. Braced sections may contain
|
34
|
+
slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
|
35
|
+
|
36
|
+
The following characters have special magic meaning when used in a
|
37
|
+
path portion:
|
38
|
+
|
39
|
+
* `*` Matches 0 or more characters in a single path portion
|
40
|
+
* `?` Matches 1 character
|
41
|
+
* `[...]` Matches a range of characters, similar to a RegExp range.
|
42
|
+
If the first character of the range is `!` or `^` then it matches
|
43
|
+
any character not in the range.
|
44
|
+
* `!(pattern|pattern|pattern)` Matches anything that does not match
|
45
|
+
any of the patterns provided.
|
46
|
+
* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
|
47
|
+
patterns provided.
|
48
|
+
* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
|
49
|
+
patterns provided.
|
50
|
+
* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
|
51
|
+
* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
|
52
|
+
provided
|
53
|
+
* `**` If a "globstar" is alone in a path portion, then it matches
|
54
|
+
zero or more directories and subdirectories searching for matches.
|
55
|
+
It does not crawl symlinked directories.
|
56
|
+
|
57
|
+
### Dots
|
58
|
+
|
59
|
+
If a file or directory path portion has a `.` as the first character,
|
60
|
+
then it will not match any glob pattern unless that pattern's
|
61
|
+
corresponding path part also has a `.` as its first character.
|
62
|
+
|
63
|
+
For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
|
64
|
+
However the pattern `a/*/c` would not, because `*` does not start with
|
65
|
+
a dot character.
|
66
|
+
|
67
|
+
You can make glob treat dots as normal characters by setting
|
68
|
+
`dot:true` in the options.
|
69
|
+
|
70
|
+
### Basename Matching
|
71
|
+
|
72
|
+
If you set `matchBase:true` in the options, and the pattern has no
|
73
|
+
slashes in it, then it will seek for any file anywhere in the tree
|
74
|
+
with a matching basename. For example, `*.js` would match
|
75
|
+
`test/simple/basic.js`.
|
76
|
+
|
77
|
+
### Negation
|
78
|
+
|
79
|
+
The intent for negation would be for a pattern starting with `!` to
|
80
|
+
match everything that *doesn't* match the supplied pattern. However,
|
81
|
+
the implementation is weird, and for the time being, this should be
|
82
|
+
avoided. The behavior will change or be deprecated in version 5.
|
83
|
+
|
84
|
+
### Empty Sets
|
85
|
+
|
86
|
+
If no matching files are found, then an empty array is returned. This
|
87
|
+
differs from the shell, where the pattern itself is returned. For
|
88
|
+
example:
|
89
|
+
|
90
|
+
$ echo a*s*d*f
|
91
|
+
a*s*d*f
|
92
|
+
|
93
|
+
To get the bash-style behavior, set the `nonull:true` in the options.
|
94
|
+
|
95
|
+
### See Also:
|
96
|
+
|
97
|
+
* `man sh`
|
98
|
+
* `man bash` (Search for "Pattern Matching")
|
99
|
+
* `man 3 fnmatch`
|
100
|
+
* `man 5 gitignore`
|
101
|
+
* [minimatch documentation](https://github.com/isaacs/minimatch)
|
102
|
+
|
103
|
+
## glob.hasMagic(pattern, [options])
|
104
|
+
|
105
|
+
Returns `true` if there are any special characters in the pattern, and
|
106
|
+
`false` otherwise.
|
107
|
+
|
108
|
+
Note that the options affect the results. If `noext:true` is set in
|
109
|
+
the options object, then `+(a|b)` will not be considered a magic
|
110
|
+
pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
|
111
|
+
then that is considered magical, unless `nobrace:true` is set in the
|
112
|
+
options.
|
113
|
+
|
114
|
+
## glob(pattern, [options], cb)
|
115
|
+
|
116
|
+
* `pattern` {String} Pattern to be matched
|
117
|
+
* `options` {Object}
|
118
|
+
* `cb` {Function}
|
119
|
+
* `err` {Error | null}
|
120
|
+
* `matches` {Array<String>} filenames found matching the pattern
|
121
|
+
|
122
|
+
Perform an asynchronous glob search.
|
123
|
+
|
124
|
+
## glob.sync(pattern, [options])
|
125
|
+
|
126
|
+
* `pattern` {String} Pattern to be matched
|
127
|
+
* `options` {Object}
|
128
|
+
* return: {Array<String>} filenames found matching the pattern
|
129
|
+
|
130
|
+
Perform a synchronous glob search.
|
131
|
+
|
132
|
+
## Class: glob.Glob
|
133
|
+
|
134
|
+
Create a Glob object by instantiating the `glob.Glob` class.
|
135
|
+
|
136
|
+
```javascript
|
137
|
+
var Glob = require("glob").Glob
|
138
|
+
var mg = new Glob(pattern, options, cb)
|
139
|
+
```
|
140
|
+
|
141
|
+
It's an EventEmitter, and starts walking the filesystem to find matches
|
142
|
+
immediately.
|
143
|
+
|
144
|
+
### new glob.Glob(pattern, [options], [cb])
|
145
|
+
|
146
|
+
* `pattern` {String} pattern to search for
|
147
|
+
* `options` {Object}
|
148
|
+
* `cb` {Function} Called when an error occurs, or matches are found
|
149
|
+
* `err` {Error | null}
|
150
|
+
* `matches` {Array<String>} filenames found matching the pattern
|
151
|
+
|
152
|
+
Note that if the `sync` flag is set in the options, then matches will
|
153
|
+
be immediately available on the `g.found` member.
|
154
|
+
|
155
|
+
### Properties
|
156
|
+
|
157
|
+
* `minimatch` The minimatch object that the glob uses.
|
158
|
+
* `options` The options object passed in.
|
159
|
+
* `aborted` Boolean which is set to true when calling `abort()`. There
|
160
|
+
is no way at this time to continue a glob search after aborting, but
|
161
|
+
you can re-use the statCache to avoid having to duplicate syscalls.
|
162
|
+
* `statCache` Collection of all the stat results the glob search
|
163
|
+
performed.
|
164
|
+
* `cache` Convenience object. Each field has the following possible
|
165
|
+
values:
|
166
|
+
* `false` - Path does not exist
|
167
|
+
* `true` - Path exists
|
168
|
+
* `'DIR'` - Path exists, and is not a directory
|
169
|
+
* `'FILE'` - Path exists, and is a directory
|
170
|
+
* `[file, entries, ...]` - Path exists, is a directory, and the
|
171
|
+
array value is the results of `fs.readdir`
|
172
|
+
* `statCache` Cache of `fs.stat` results, to prevent statting the same
|
173
|
+
path multiple times.
|
174
|
+
* `symlinks` A record of which paths are symbolic links, which is
|
175
|
+
relevant in resolving `**` patterns.
|
176
|
+
|
177
|
+
### Events
|
178
|
+
|
179
|
+
* `end` When the matching is finished, this is emitted with all the
|
180
|
+
matches found. If the `nonull` option is set, and no match was found,
|
181
|
+
then the `matches` list contains the original pattern. The matches
|
182
|
+
are sorted, unless the `nosort` flag is set.
|
183
|
+
* `match` Every time a match is found, this is emitted with the matched.
|
184
|
+
* `error` Emitted when an unexpected error is encountered, or whenever
|
185
|
+
any fs error occurs if `options.strict` is set.
|
186
|
+
* `abort` When `abort()` is called, this event is raised.
|
187
|
+
|
188
|
+
### Methods
|
189
|
+
|
190
|
+
* `pause` Temporarily stop the search
|
191
|
+
* `resume` Resume the search
|
192
|
+
* `abort` Stop the search forever
|
193
|
+
|
194
|
+
### Options
|
195
|
+
|
196
|
+
All the options that can be passed to Minimatch can also be passed to
|
197
|
+
Glob to change pattern matching behavior. Also, some have been added,
|
198
|
+
or have glob-specific ramifications.
|
199
|
+
|
200
|
+
All options are false by default, unless otherwise noted.
|
201
|
+
|
202
|
+
All options are added to the Glob object, as well.
|
203
|
+
|
204
|
+
If you are running many `glob` operations, you can pass a Glob object
|
205
|
+
as the `options` argument to a subsequent operation to shortcut some
|
206
|
+
`stat` and `readdir` calls. At the very least, you may pass in shared
|
207
|
+
`symlinks`, `statCache`, and `cache` options, so that parallel glob
|
208
|
+
operations will be sped up by sharing information about the
|
209
|
+
filesystem.
|
210
|
+
|
211
|
+
* `cwd` The current working directory in which to search. Defaults
|
212
|
+
to `process.cwd()`.
|
213
|
+
* `root` The place where patterns starting with `/` will be mounted
|
214
|
+
onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
|
215
|
+
systems, and `C:\` or some such on Windows.)
|
216
|
+
* `dot` Include `.dot` files in normal matches and `globstar` matches.
|
217
|
+
Note that an explicit dot in a portion of the pattern will always
|
218
|
+
match dot files.
|
219
|
+
* `nomount` By default, a pattern starting with a forward-slash will be
|
220
|
+
"mounted" onto the root setting, so that a valid filesystem path is
|
221
|
+
returned. Set this flag to disable that behavior.
|
222
|
+
* `mark` Add a `/` character to directory matches. Note that this
|
223
|
+
requires additional stat calls.
|
224
|
+
* `nosort` Don't sort the results.
|
225
|
+
* `stat` Set to true to stat *all* results. This reduces performance
|
226
|
+
somewhat, and is completely unnecessary, unless `readdir` is presumed
|
227
|
+
to be an untrustworthy indicator of file existence.
|
228
|
+
* `silent` When an unusual error is encountered when attempting to
|
229
|
+
read a directory, a warning will be printed to stderr. Set the
|
230
|
+
`silent` option to true to suppress these warnings.
|
231
|
+
* `strict` When an unusual error is encountered when attempting to
|
232
|
+
read a directory, the process will just continue on in search of
|
233
|
+
other matches. Set the `strict` option to raise an error in these
|
234
|
+
cases.
|
235
|
+
* `cache` See `cache` property above. Pass in a previously generated
|
236
|
+
cache object to save some fs calls.
|
237
|
+
* `statCache` A cache of results of filesystem information, to prevent
|
238
|
+
unnecessary stat calls. While it should not normally be necessary
|
239
|
+
to set this, you may pass the statCache from one glob() call to the
|
240
|
+
options object of another, if you know that the filesystem will not
|
241
|
+
change between calls. (See "Race Conditions" below.)
|
242
|
+
* `symlinks` A cache of known symbolic links. You may pass in a
|
243
|
+
previously generated `symlinks` object to save `lstat` calls when
|
244
|
+
resolving `**` matches.
|
245
|
+
* `sync` Perform a synchronous glob search.
|
246
|
+
* `nounique` In some cases, brace-expanded patterns can result in the
|
247
|
+
same file showing up multiple times in the result set. By default,
|
248
|
+
this implementation prevents duplicates in the result set. Set this
|
249
|
+
flag to disable that behavior.
|
250
|
+
* `nonull` Set to never return an empty set, instead returning a set
|
251
|
+
containing the pattern itself. This is the default in glob(3).
|
252
|
+
* `debug` Set to enable debug logging in minimatch and glob.
|
253
|
+
* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
|
254
|
+
* `noglobstar` Do not match `**` against multiple filenames. (Ie,
|
255
|
+
treat it as a normal `*` instead.)
|
256
|
+
* `noext` Do not match `+(a|b)` "extglob" patterns.
|
257
|
+
* `nocase` Perform a case-insensitive match. Note: on
|
258
|
+
case-insensitive filesystems, non-magic patterns will match by
|
259
|
+
default, since `stat` and `readdir` will not raise errors.
|
260
|
+
* `matchBase` Perform a basename-only match if the pattern does not
|
261
|
+
contain any slash characters. That is, `*.js` would be treated as
|
262
|
+
equivalent to `**/*.js`, matching all js files in all directories.
|
263
|
+
* `nonegate` Suppress `negate` behavior. (See below.)
|
264
|
+
* `nocomment` Suppress `comment` behavior. (See below.)
|
265
|
+
* `nonull` Return the pattern when no matches are found.
|
266
|
+
* `nodir` Do not match directories, only files.
|
267
|
+
|
268
|
+
## Comparisons to other fnmatch/glob implementations
|
269
|
+
|
270
|
+
While strict compliance with the existing standards is a worthwhile
|
271
|
+
goal, some discrepancies exist between node-glob and other
|
272
|
+
implementations, and are intentional.
|
273
|
+
|
274
|
+
If the pattern starts with a `!` character, then it is negated. Set the
|
275
|
+
`nonegate` flag to suppress this behavior, and treat leading `!`
|
276
|
+
characters normally. This is perhaps relevant if you wish to start the
|
277
|
+
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
|
278
|
+
characters at the start of a pattern will negate the pattern multiple
|
279
|
+
times.
|
280
|
+
|
281
|
+
If a pattern starts with `#`, then it is treated as a comment, and
|
282
|
+
will not match anything. Use `\#` to match a literal `#` at the
|
283
|
+
start of a line, or set the `nocomment` flag to suppress this behavior.
|
284
|
+
|
285
|
+
The double-star character `**` is supported by default, unless the
|
286
|
+
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
287
|
+
and bash 4.3, where `**` only has special significance if it is the only
|
288
|
+
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
289
|
+
`a/**b` will not.
|
290
|
+
|
291
|
+
Note that symlinked directories are not crawled as part of a `**`,
|
292
|
+
though their contents may match against subsequent portions of the
|
293
|
+
pattern. This prevents infinite loops and duplicates and the like.
|
294
|
+
|
295
|
+
If an escaped pattern has no matches, and the `nonull` flag is set,
|
296
|
+
then glob returns the pattern as-provided, rather than
|
297
|
+
interpreting the character escapes. For example,
|
298
|
+
`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
299
|
+
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
300
|
+
that it does not resolve escaped pattern characters.
|
301
|
+
|
302
|
+
If brace expansion is not disabled, then it is performed before any
|
303
|
+
other interpretation of the glob pattern. Thus, a pattern like
|
304
|
+
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
305
|
+
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
306
|
+
checked for validity. Since those two are valid, matching proceeds.
|
307
|
+
|
308
|
+
## Windows
|
309
|
+
|
310
|
+
**Please only use forward-slashes in glob expressions.**
|
311
|
+
|
312
|
+
Though windows uses either `/` or `\` as its path separator, only `/`
|
313
|
+
characters are used by this glob implementation. You must use
|
314
|
+
forward-slashes **only** in glob expressions. Back-slashes will always
|
315
|
+
be interpreted as escape characters, not path separators.
|
316
|
+
|
317
|
+
Results from absolute patterns such as `/foo/*` are mounted onto the
|
318
|
+
root setting using `path.join`. On windows, this will by default result
|
319
|
+
in `/foo/*` matching `C:\foo\bar.txt`.
|
320
|
+
|
321
|
+
## Race Conditions
|
322
|
+
|
323
|
+
Glob searching, by its very nature, is susceptible to race conditions,
|
324
|
+
since it relies on directory walking and such.
|
325
|
+
|
326
|
+
As a result, it is possible that a file that exists when glob looks for
|
327
|
+
it may have been deleted or modified by the time it returns the result.
|
328
|
+
|
329
|
+
As part of its internal implementation, this program caches all stat
|
330
|
+
and readdir calls that it makes, in order to cut down on system
|
331
|
+
overhead. However, this also makes it even more susceptible to races,
|
332
|
+
especially if the cache or statCache objects are reused between glob
|
333
|
+
calls.
|
334
|
+
|
335
|
+
Users are thus advised not to use a glob result as a guarantee of
|
336
|
+
filesystem state in the face of rapid changes. For the vast majority
|
337
|
+
of operations, this is never a problem.
|
338
|
+
|
339
|
+
## Contributing
|
340
|
+
|
341
|
+
Any change to behavior (including bugfixes) must come with a test.
|
342
|
+
|
343
|
+
Patches that fail tests or reduce performance will be rejected.
|
344
|
+
|
345
|
+
```
|
346
|
+
# to run tests
|
347
|
+
npm test
|
348
|
+
|
349
|
+
# to re-generate test fixtures
|
350
|
+
npm run test-regen
|
351
|
+
|
352
|
+
# to benchmark against bash/zsh
|
353
|
+
npm run bench
|
354
|
+
|
355
|
+
# to profile javascript
|
356
|
+
npm run prof
|
357
|
+
```
|
@@ -0,0 +1,177 @@
|
|
1
|
+
exports.alphasort = alphasort
|
2
|
+
exports.alphasorti = alphasorti
|
3
|
+
exports.isAbsolute = process.platform === "win32" ? absWin : absUnix
|
4
|
+
exports.setopts = setopts
|
5
|
+
exports.ownProp = ownProp
|
6
|
+
exports.makeAbs = makeAbs
|
7
|
+
exports.finish = finish
|
8
|
+
exports.mark = mark
|
9
|
+
|
10
|
+
function ownProp (obj, field) {
|
11
|
+
return Object.prototype.hasOwnProperty.call(obj, field)
|
12
|
+
}
|
13
|
+
|
14
|
+
var path = require("path")
|
15
|
+
var minimatch = require("minimatch")
|
16
|
+
var Minimatch = minimatch.Minimatch
|
17
|
+
|
18
|
+
function absWin (p) {
|
19
|
+
if (absUnix(p)) return true
|
20
|
+
// pull off the device/UNC bit from a windows path.
|
21
|
+
// from node's lib/path.js
|
22
|
+
var splitDeviceRe =
|
23
|
+
/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
|
24
|
+
var result = splitDeviceRe.exec(p)
|
25
|
+
var device = result[1] || ''
|
26
|
+
var isUnc = device && device.charAt(1) !== ':'
|
27
|
+
var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
|
28
|
+
|
29
|
+
return isAbsolute
|
30
|
+
}
|
31
|
+
|
32
|
+
function absUnix (p) {
|
33
|
+
return p.charAt(0) === "/" || p === ""
|
34
|
+
}
|
35
|
+
|
36
|
+
function alphasorti (a, b) {
|
37
|
+
return a.toLowerCase().localeCompare(b.toLowerCase())
|
38
|
+
}
|
39
|
+
|
40
|
+
function alphasort (a, b) {
|
41
|
+
return a.localeCompare(b)
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
function setopts (self, pattern, options) {
|
46
|
+
if (!options)
|
47
|
+
options = {}
|
48
|
+
|
49
|
+
// base-matching: just use globstar for that.
|
50
|
+
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
51
|
+
if (options.noglobstar) {
|
52
|
+
throw new Error("base matching requires globstar")
|
53
|
+
}
|
54
|
+
pattern = "**/" + pattern
|
55
|
+
}
|
56
|
+
|
57
|
+
self.pattern = pattern
|
58
|
+
self.strict = options.strict !== false
|
59
|
+
self.dot = !!options.dot
|
60
|
+
self.mark = !!options.mark
|
61
|
+
self.nodir = !!options.nodir
|
62
|
+
if (self.nodir)
|
63
|
+
self.mark = true
|
64
|
+
self.sync = !!options.sync
|
65
|
+
self.nounique = !!options.nounique
|
66
|
+
self.nonull = !!options.nonull
|
67
|
+
self.nosort = !!options.nosort
|
68
|
+
self.nocase = !!options.nocase
|
69
|
+
self.stat = !!options.stat
|
70
|
+
self.noprocess = !!options.noprocess
|
71
|
+
|
72
|
+
self.maxLength = options.maxLength || Infinity
|
73
|
+
self.cache = options.cache || Object.create(null)
|
74
|
+
self.statCache = options.statCache || Object.create(null)
|
75
|
+
self.symlinks = options.symlinks || Object.create(null)
|
76
|
+
|
77
|
+
self.changedCwd = false
|
78
|
+
var cwd = process.cwd()
|
79
|
+
if (!ownProp(options, "cwd"))
|
80
|
+
self.cwd = cwd
|
81
|
+
else {
|
82
|
+
self.cwd = options.cwd
|
83
|
+
self.changedCwd = path.resolve(options.cwd) !== cwd
|
84
|
+
}
|
85
|
+
|
86
|
+
self.root = options.root || path.resolve(self.cwd, "/")
|
87
|
+
self.root = path.resolve(self.root)
|
88
|
+
if (process.platform === "win32")
|
89
|
+
self.root = self.root.replace(/\\/g, "/")
|
90
|
+
|
91
|
+
self.nomount = !!options.nomount
|
92
|
+
|
93
|
+
self.minimatch = new Minimatch(pattern, options)
|
94
|
+
self.options = self.minimatch.options
|
95
|
+
}
|
96
|
+
|
97
|
+
function finish (self) {
|
98
|
+
var nou = self.nounique
|
99
|
+
var all = nou ? [] : Object.create(null)
|
100
|
+
|
101
|
+
for (var i = 0, l = self.matches.length; i < l; i ++) {
|
102
|
+
var matches = self.matches[i]
|
103
|
+
if (!matches) {
|
104
|
+
if (self.nonull) {
|
105
|
+
// do like the shell, and spit out the literal glob
|
106
|
+
var literal = self.minimatch.globSet[i]
|
107
|
+
if (nou)
|
108
|
+
all.push(literal)
|
109
|
+
else
|
110
|
+
all[literal] = true
|
111
|
+
}
|
112
|
+
} else {
|
113
|
+
// had matches
|
114
|
+
var m = Object.keys(matches)
|
115
|
+
if (nou)
|
116
|
+
all.push.apply(all, m)
|
117
|
+
else
|
118
|
+
m.forEach(function (m) {
|
119
|
+
all[m] = true
|
120
|
+
})
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
if (!nou)
|
125
|
+
all = Object.keys(all)
|
126
|
+
|
127
|
+
if (!self.nosort)
|
128
|
+
all = all.sort(self.nocase ? alphasorti : alphasort)
|
129
|
+
|
130
|
+
// at *some* point we statted all of these
|
131
|
+
if (self.mark) {
|
132
|
+
for (var i = 0; i < all.length; i++) {
|
133
|
+
all[i] = self._mark(all[i])
|
134
|
+
}
|
135
|
+
if (self.nodir) {
|
136
|
+
all = all.filter(function (e) {
|
137
|
+
return !(/\/$/.test(e))
|
138
|
+
})
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
self.found = all
|
143
|
+
}
|
144
|
+
|
145
|
+
function mark (self, p) {
|
146
|
+
var c = self.cache[p]
|
147
|
+
var m = p
|
148
|
+
if (c) {
|
149
|
+
var isDir = c === 'DIR' || Array.isArray(c)
|
150
|
+
var slash = p.slice(-1) === '/'
|
151
|
+
|
152
|
+
if (isDir && !slash)
|
153
|
+
m += '/'
|
154
|
+
else if (!isDir && slash)
|
155
|
+
m = m.slice(0, -1)
|
156
|
+
|
157
|
+
if (m !== p) {
|
158
|
+
self.statCache[m] = self.statCache[p]
|
159
|
+
self.cache[m] = self.cache[p]
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
return m
|
164
|
+
}
|
165
|
+
|
166
|
+
// lotta situps...
|
167
|
+
function makeAbs (self, f) {
|
168
|
+
var abs = f
|
169
|
+
if (f.charAt(0) === "/") {
|
170
|
+
abs = path.join(self.root, f)
|
171
|
+
} else if (exports.isAbsolute(f)) {
|
172
|
+
abs = f
|
173
|
+
} else if (self.changedCwd) {
|
174
|
+
abs = path.resolve(self.cwd, f)
|
175
|
+
}
|
176
|
+
return abs
|
177
|
+
}
|