traceur-rb 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/traceur/configuration.rb +1 -1
- data/lib/traceur/version.rb +1 -1
- data/{vendor/node_modules → node_modules}/.bin/traceur +0 -0
- data/{vendor/node_modules → node_modules}/traceur/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/README.md +0 -0
- data/node_modules/traceur/bin/traceur-runtime.js +3420 -0
- data/node_modules/traceur/bin/traceur.js +30354 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/.bin/semver +0 -0
- data/node_modules/traceur/node_modules/commander/History.md +256 -0
- data/node_modules/traceur/node_modules/commander/LICENSE +22 -0
- data/node_modules/traceur/node_modules/commander/Readme.md +342 -0
- data/node_modules/traceur/node_modules/commander/index.js +1103 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/.npmignore +3 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/.travis.yml +5 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/LICENSE +22 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/README.md +17 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/index.js +12 -0
- data/node_modules/traceur/node_modules/commander/node_modules/graceful-readlink/package.json +48 -0
- data/node_modules/traceur/node_modules/commander/package.json +75 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/common.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/glob.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/.eslintrc +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/inflight.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +52 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inflight/test.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inherits/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inherits/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inherits/inherits.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +50 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/inherits/test.js +0 -0
- data/{vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy → node_modules/traceur/node_modules/glob/node_modules/minimatch}/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/README.md +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1159 -0
- data/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +912 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +63 -0
- data/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +15 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/README.md +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +52 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/once.js +0 -0
- data/node_modules/traceur/node_modules/glob/node_modules/once/package.json +60 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/node_modules/once/test/once.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/package.json +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/glob/sync.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +255 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/LICENSE +0 -0
- data/node_modules/traceur/node_modules/rsvp/README.md +366 -0
- data/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1597 -0
- data/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +70 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +51 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/-internal.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +73 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/all.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +112 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/config.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +130 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +205 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/filter.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +126 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/map.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/platform.js +14 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +52 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/race.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
- data/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/rsvp/lib/rsvp/utils.js +0 -0
- data/node_modules/traceur/node_modules/rsvp/package.json +106 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/.npmignore +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/Makefile +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/bin/semver +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/foot.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/head.js +0 -0
- data/node_modules/traceur/node_modules/semver/package.json +50 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/semver.browser.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/semver.browser.js.gz +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/semver.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/semver.min.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/semver.min.js.gz +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/test/amd.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/test/gtr.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/test/index.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/test/ltr.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/semver/test/no-module.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/.npmignore +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/LICENSE.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/README.md +0 -0
- data/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/amd-test/index.html +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/amd-test/require.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/amd-test/script.coffee +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/amd-test/script.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/amd-test/script.map +0 -0
- data/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/browser-test/index.html +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/browser-test/script.coffee +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/browser-test/script.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/browser-test/script.map +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/build.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/header-test/index.html +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/header-test/script.coffee +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/header-test/script.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/header-test/script.map +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/header-test/server.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/.travis.yml +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/README.md +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +0 -0
- data/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +301 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +0 -0
- data/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +47 -0
- data/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +0 -0
- data/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
- data/node_modules/traceur/node_modules/source-map-support/source-map-support.js +386 -0
- data/node_modules/traceur/node_modules/source-map-support/test.js +384 -0
- data/node_modules/traceur/package.json +286 -0
- data/node_modules/traceur/src/node/NodeCompiler.js +81 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/System.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/api.js +0 -0
- data/node_modules/traceur/src/node/command.js +203 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/compileAllJsFilesInDir.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/deferred.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/file-util.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/getopt.js +0 -0
- data/node_modules/traceur/src/node/interpreter.js +37 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/nodeLoader.js +0 -0
- data/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/require.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/to-amd-compiler.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/to-closure-compiler.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/to-commonjs-compiler.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/src/node/traceur.js +0 -0
- data/{vendor/node_modules → node_modules}/traceur/traceur +0 -0
- data/package.json +15 -0
- data/spec/traceur/configuration_spec.rb +3 -3
- metadata +225 -161
File without changes
|
@@ -0,0 +1,256 @@
|
|
1
|
+
|
2
|
+
2.8.1 / 2015-04-22
|
3
|
+
==================
|
4
|
+
|
5
|
+
* Back out `support multiline description` Close #396 #397
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
2.8.0 / 2015-04-07
|
10
|
+
==================
|
11
|
+
|
12
|
+
* Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee
|
13
|
+
* Fix bug in Git-style sub-commands #372 @zhiyelee
|
14
|
+
* Allow commands to be hidden from help #383 @tonylukasavage
|
15
|
+
* When git-style sub-commands are in use, yet none are called, display help #382 @claylo
|
16
|
+
* Add ability to specify arguments syntax for top-level command #258 @rrthomas
|
17
|
+
* Support multiline descriptions #208 @zxqfox
|
18
|
+
|
19
|
+
2.7.1 / 2015-03-11
|
20
|
+
==================
|
21
|
+
|
22
|
+
* Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367.
|
23
|
+
|
24
|
+
2.7.0 / 2015-03-09
|
25
|
+
==================
|
26
|
+
|
27
|
+
* Fix git-style bug when installed globally. Close #335 #349 @zhiyelee
|
28
|
+
* Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage
|
29
|
+
* Add support for camelCase on `opts()`. Close #353 @nkzawa
|
30
|
+
* Add node.js 0.12 and io.js to travis.yml
|
31
|
+
* Allow RegEx options. #337 @palanik
|
32
|
+
* Fixes exit code when sub-command failing. Close #260 #332 @pirelenito
|
33
|
+
* git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee
|
34
|
+
|
35
|
+
2.6.0 / 2014-12-30
|
36
|
+
==================
|
37
|
+
|
38
|
+
* added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee
|
39
|
+
* Add application description to the help msg. Close #112 @dalssoft
|
40
|
+
|
41
|
+
2.5.1 / 2014-12-15
|
42
|
+
==================
|
43
|
+
|
44
|
+
* fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee
|
45
|
+
|
46
|
+
2.5.0 / 2014-10-24
|
47
|
+
==================
|
48
|
+
|
49
|
+
* add support for variadic arguments. Closes #277 @whitlockjc
|
50
|
+
|
51
|
+
2.4.0 / 2014-10-17
|
52
|
+
==================
|
53
|
+
|
54
|
+
* fixed a bug on executing the coercion function of subcommands option. Closes #270
|
55
|
+
* added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage
|
56
|
+
* added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage
|
57
|
+
* fixed a bug on subcommand name. Closes #248 @jonathandelgado
|
58
|
+
* fixed function normalize doesn’t honor option terminator. Closes #216 @abbr
|
59
|
+
|
60
|
+
2.3.0 / 2014-07-16
|
61
|
+
==================
|
62
|
+
|
63
|
+
* add command alias'. Closes PR #210
|
64
|
+
* fix: Typos. Closes #99
|
65
|
+
* fix: Unused fs module. Closes #217
|
66
|
+
|
67
|
+
2.2.0 / 2014-03-29
|
68
|
+
==================
|
69
|
+
|
70
|
+
* add passing of previous option value
|
71
|
+
* fix: support subcommands on windows. Closes #142
|
72
|
+
* Now the defaultValue passed as the second argument of the coercion function.
|
73
|
+
|
74
|
+
2.1.0 / 2013-11-21
|
75
|
+
==================
|
76
|
+
|
77
|
+
* add: allow cflag style option params, unit test, fixes #174
|
78
|
+
|
79
|
+
2.0.0 / 2013-07-18
|
80
|
+
==================
|
81
|
+
|
82
|
+
* remove input methods (.prompt, .confirm, etc)
|
83
|
+
|
84
|
+
1.3.2 / 2013-07-18
|
85
|
+
==================
|
86
|
+
|
87
|
+
* add support for sub-commands to co-exist with the original command
|
88
|
+
|
89
|
+
1.3.1 / 2013-07-18
|
90
|
+
==================
|
91
|
+
|
92
|
+
* add quick .runningCommand hack so you can opt-out of other logic when running a sub command
|
93
|
+
|
94
|
+
1.3.0 / 2013-07-09
|
95
|
+
==================
|
96
|
+
|
97
|
+
* add EACCES error handling
|
98
|
+
* fix sub-command --help
|
99
|
+
|
100
|
+
1.2.0 / 2013-06-13
|
101
|
+
==================
|
102
|
+
|
103
|
+
* allow "-" hyphen as an option argument
|
104
|
+
* support for RegExp coercion
|
105
|
+
|
106
|
+
1.1.1 / 2012-11-20
|
107
|
+
==================
|
108
|
+
|
109
|
+
* add more sub-command padding
|
110
|
+
* fix .usage() when args are present. Closes #106
|
111
|
+
|
112
|
+
1.1.0 / 2012-11-16
|
113
|
+
==================
|
114
|
+
|
115
|
+
* add git-style executable subcommand support. Closes #94
|
116
|
+
|
117
|
+
1.0.5 / 2012-10-09
|
118
|
+
==================
|
119
|
+
|
120
|
+
* fix `--name` clobbering. Closes #92
|
121
|
+
* fix examples/help. Closes #89
|
122
|
+
|
123
|
+
1.0.4 / 2012-09-03
|
124
|
+
==================
|
125
|
+
|
126
|
+
* add `outputHelp()` method.
|
127
|
+
|
128
|
+
1.0.3 / 2012-08-30
|
129
|
+
==================
|
130
|
+
|
131
|
+
* remove invalid .version() defaulting
|
132
|
+
|
133
|
+
1.0.2 / 2012-08-24
|
134
|
+
==================
|
135
|
+
|
136
|
+
* add `--foo=bar` support [arv]
|
137
|
+
* fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
|
138
|
+
|
139
|
+
1.0.1 / 2012-08-03
|
140
|
+
==================
|
141
|
+
|
142
|
+
* fix issue #56
|
143
|
+
* fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
|
144
|
+
|
145
|
+
1.0.0 / 2012-07-05
|
146
|
+
==================
|
147
|
+
|
148
|
+
* add support for optional option descriptions
|
149
|
+
* add defaulting of `.version()` to package.json's version
|
150
|
+
|
151
|
+
0.6.1 / 2012-06-01
|
152
|
+
==================
|
153
|
+
|
154
|
+
* Added: append (yes or no) on confirmation
|
155
|
+
* Added: allow node.js v0.7.x
|
156
|
+
|
157
|
+
0.6.0 / 2012-04-10
|
158
|
+
==================
|
159
|
+
|
160
|
+
* Added `.prompt(obj, callback)` support. Closes #49
|
161
|
+
* Added default support to .choose(). Closes #41
|
162
|
+
* Fixed the choice example
|
163
|
+
|
164
|
+
0.5.1 / 2011-12-20
|
165
|
+
==================
|
166
|
+
|
167
|
+
* Fixed `password()` for recent nodes. Closes #36
|
168
|
+
|
169
|
+
0.5.0 / 2011-12-04
|
170
|
+
==================
|
171
|
+
|
172
|
+
* Added sub-command option support [itay]
|
173
|
+
|
174
|
+
0.4.3 / 2011-12-04
|
175
|
+
==================
|
176
|
+
|
177
|
+
* Fixed custom help ordering. Closes #32
|
178
|
+
|
179
|
+
0.4.2 / 2011-11-24
|
180
|
+
==================
|
181
|
+
|
182
|
+
* Added travis support
|
183
|
+
* Fixed: line-buffered input automatically trimmed. Closes #31
|
184
|
+
|
185
|
+
0.4.1 / 2011-11-18
|
186
|
+
==================
|
187
|
+
|
188
|
+
* Removed listening for "close" on --help
|
189
|
+
|
190
|
+
0.4.0 / 2011-11-15
|
191
|
+
==================
|
192
|
+
|
193
|
+
* Added support for `--`. Closes #24
|
194
|
+
|
195
|
+
0.3.3 / 2011-11-14
|
196
|
+
==================
|
197
|
+
|
198
|
+
* Fixed: wait for close event when writing help info [Jerry Hamlet]
|
199
|
+
|
200
|
+
0.3.2 / 2011-11-01
|
201
|
+
==================
|
202
|
+
|
203
|
+
* Fixed long flag definitions with values [felixge]
|
204
|
+
|
205
|
+
0.3.1 / 2011-10-31
|
206
|
+
==================
|
207
|
+
|
208
|
+
* Changed `--version` short flag to `-V` from `-v`
|
209
|
+
* Changed `.version()` so it's configurable [felixge]
|
210
|
+
|
211
|
+
0.3.0 / 2011-10-31
|
212
|
+
==================
|
213
|
+
|
214
|
+
* Added support for long flags only. Closes #18
|
215
|
+
|
216
|
+
0.2.1 / 2011-10-24
|
217
|
+
==================
|
218
|
+
|
219
|
+
* "node": ">= 0.4.x < 0.7.0". Closes #20
|
220
|
+
|
221
|
+
0.2.0 / 2011-09-26
|
222
|
+
==================
|
223
|
+
|
224
|
+
* Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
|
225
|
+
|
226
|
+
0.1.0 / 2011-08-24
|
227
|
+
==================
|
228
|
+
|
229
|
+
* Added support for custom `--help` output
|
230
|
+
|
231
|
+
0.0.5 / 2011-08-18
|
232
|
+
==================
|
233
|
+
|
234
|
+
* Changed: when the user enters nothing prompt for password again
|
235
|
+
* Fixed issue with passwords beginning with numbers [NuckChorris]
|
236
|
+
|
237
|
+
0.0.4 / 2011-08-15
|
238
|
+
==================
|
239
|
+
|
240
|
+
* Fixed `Commander#args`
|
241
|
+
|
242
|
+
0.0.3 / 2011-08-15
|
243
|
+
==================
|
244
|
+
|
245
|
+
* Added default option value support
|
246
|
+
|
247
|
+
0.0.2 / 2011-08-15
|
248
|
+
==================
|
249
|
+
|
250
|
+
* Added mask support to `Command#password(str[, mask], fn)`
|
251
|
+
* Added `Command#password(str, fn)`
|
252
|
+
|
253
|
+
0.0.1 / 2010-01-03
|
254
|
+
==================
|
255
|
+
|
256
|
+
* Initial release
|
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,342 @@
|
|
1
|
+
# Commander.js
|
2
|
+
|
3
|
+
|
4
|
+
[![Build Status](https://api.travis-ci.org/tj/commander.js.svg)](http://travis-ci.org/tj/commander.js)
|
5
|
+
[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
|
6
|
+
[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
|
7
|
+
[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
8
|
+
|
9
|
+
The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander).
|
10
|
+
[API documentation](http://tj.github.com/commander.js/)
|
11
|
+
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
$ npm install commander
|
16
|
+
|
17
|
+
## Option parsing
|
18
|
+
|
19
|
+
Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
|
20
|
+
|
21
|
+
```js
|
22
|
+
#!/usr/bin/env node
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Module dependencies.
|
26
|
+
*/
|
27
|
+
|
28
|
+
var program = require('commander');
|
29
|
+
|
30
|
+
program
|
31
|
+
.version('0.0.1')
|
32
|
+
.option('-p, --peppers', 'Add peppers')
|
33
|
+
.option('-P, --pineapple', 'Add pineapple')
|
34
|
+
.option('-b, --bbq-sauce', 'Add bbq sauce')
|
35
|
+
.option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
|
36
|
+
.parse(process.argv);
|
37
|
+
|
38
|
+
console.log('you ordered a pizza with:');
|
39
|
+
if (program.peppers) console.log(' - peppers');
|
40
|
+
if (program.pineapple) console.log(' - pineapple');
|
41
|
+
if (program.bbqSauce) console.log(' - bbq');
|
42
|
+
console.log(' - %s cheese', program.cheese);
|
43
|
+
```
|
44
|
+
|
45
|
+
Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
|
46
|
+
|
47
|
+
|
48
|
+
## Coercion
|
49
|
+
|
50
|
+
```js
|
51
|
+
function range(val) {
|
52
|
+
return val.split('..').map(Number);
|
53
|
+
}
|
54
|
+
|
55
|
+
function list(val) {
|
56
|
+
return val.split(',');
|
57
|
+
}
|
58
|
+
|
59
|
+
function collect(val, memo) {
|
60
|
+
memo.push(val);
|
61
|
+
return memo;
|
62
|
+
}
|
63
|
+
|
64
|
+
function increaseVerbosity(v, total) {
|
65
|
+
return total + 1;
|
66
|
+
}
|
67
|
+
|
68
|
+
program
|
69
|
+
.version('0.0.1')
|
70
|
+
.usage('[options] <file ...>')
|
71
|
+
.option('-i, --integer <n>', 'An integer argument', parseInt)
|
72
|
+
.option('-f, --float <n>', 'A float argument', parseFloat)
|
73
|
+
.option('-r, --range <a>..<b>', 'A range', range)
|
74
|
+
.option('-l, --list <items>', 'A list', list)
|
75
|
+
.option('-o, --optional [value]', 'An optional value')
|
76
|
+
.option('-c, --collect [value]', 'A repeatable value', collect, [])
|
77
|
+
.option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0)
|
78
|
+
.parse(process.argv);
|
79
|
+
|
80
|
+
console.log(' int: %j', program.integer);
|
81
|
+
console.log(' float: %j', program.float);
|
82
|
+
console.log(' optional: %j', program.optional);
|
83
|
+
program.range = program.range || [];
|
84
|
+
console.log(' range: %j..%j', program.range[0], program.range[1]);
|
85
|
+
console.log(' list: %j', program.list);
|
86
|
+
console.log(' collect: %j', program.collect);
|
87
|
+
console.log(' verbosity: %j', program.verbose);
|
88
|
+
console.log(' args: %j', program.args);
|
89
|
+
```
|
90
|
+
|
91
|
+
## Regular Expression
|
92
|
+
```js
|
93
|
+
program
|
94
|
+
.version('0.0.1')
|
95
|
+
.option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium')
|
96
|
+
.option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)
|
97
|
+
.parse(process.argv);
|
98
|
+
|
99
|
+
console.log(' size: %j', program.size);
|
100
|
+
console.log(' drink: %j', program.drink);
|
101
|
+
```
|
102
|
+
|
103
|
+
## Variadic arguments
|
104
|
+
|
105
|
+
The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to
|
106
|
+
append `...` to the argument name. Here is an example:
|
107
|
+
|
108
|
+
```js
|
109
|
+
#!/usr/bin/env node
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Module dependencies.
|
113
|
+
*/
|
114
|
+
|
115
|
+
var program = require('commander');
|
116
|
+
|
117
|
+
program
|
118
|
+
.version('0.0.1')
|
119
|
+
.command('rmdir <dir> [otherDirs...]')
|
120
|
+
.action(function (dir, otherDirs) {
|
121
|
+
console.log('rmdir %s', dir);
|
122
|
+
if (otherDirs) {
|
123
|
+
otherDirs.forEach(function (oDir) {
|
124
|
+
console.log('rmdir %s', oDir);
|
125
|
+
});
|
126
|
+
}
|
127
|
+
});
|
128
|
+
|
129
|
+
program.parse(process.argv);
|
130
|
+
```
|
131
|
+
|
132
|
+
An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed
|
133
|
+
to your action as demonstrated above.
|
134
|
+
|
135
|
+
## Specify the argument syntax
|
136
|
+
|
137
|
+
```js
|
138
|
+
#!/usr/bin/env node
|
139
|
+
|
140
|
+
var program = require('../');
|
141
|
+
|
142
|
+
program
|
143
|
+
.version('0.0.1')
|
144
|
+
.arguments('<cmd> [env]')
|
145
|
+
.action(function (cmd, env) {
|
146
|
+
cmdValue = cmd;
|
147
|
+
envValue = env;
|
148
|
+
});
|
149
|
+
|
150
|
+
program.parse(process.argv);
|
151
|
+
|
152
|
+
if (typeof cmdValue === 'undefined') {
|
153
|
+
console.error('no command given!');
|
154
|
+
process.exit(1);
|
155
|
+
}
|
156
|
+
console.log('command:', cmdValue);
|
157
|
+
console.log('environment:', envValue || "no environment given");
|
158
|
+
```
|
159
|
+
|
160
|
+
## Git-style sub-commands
|
161
|
+
|
162
|
+
```js
|
163
|
+
// file: ./examples/pm
|
164
|
+
var program = require('..');
|
165
|
+
|
166
|
+
program
|
167
|
+
.version('0.0.1')
|
168
|
+
.command('install [name]', 'install one or more packages')
|
169
|
+
.command('search [query]', 'search with optional query')
|
170
|
+
.command('list', 'list packages installed')
|
171
|
+
.parse(process.argv);
|
172
|
+
```
|
173
|
+
|
174
|
+
When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools.
|
175
|
+
The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`.
|
176
|
+
|
177
|
+
If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.
|
178
|
+
|
179
|
+
### `--harmony`
|
180
|
+
|
181
|
+
You can enable `--harmony` option in two ways:
|
182
|
+
* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern.
|
183
|
+
* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process.
|
184
|
+
|
185
|
+
## Automated --help
|
186
|
+
|
187
|
+
The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
|
188
|
+
|
189
|
+
```
|
190
|
+
$ ./examples/pizza --help
|
191
|
+
|
192
|
+
Usage: pizza [options]
|
193
|
+
|
194
|
+
An application for pizzas ordering
|
195
|
+
|
196
|
+
Options:
|
197
|
+
|
198
|
+
-h, --help output usage information
|
199
|
+
-V, --version output the version number
|
200
|
+
-p, --peppers Add peppers
|
201
|
+
-P, --pineapple Add pineapple
|
202
|
+
-b, --bbq Add bbq sauce
|
203
|
+
-c, --cheese <type> Add the specified type of cheese [marble]
|
204
|
+
-C, --no-cheese You do not want any cheese
|
205
|
+
|
206
|
+
```
|
207
|
+
|
208
|
+
## Custom help
|
209
|
+
|
210
|
+
You can display arbitrary `-h, --help` information
|
211
|
+
by listening for "--help". Commander will automatically
|
212
|
+
exit once you are done so that the remainder of your program
|
213
|
+
does not execute causing undesired behaviours, for example
|
214
|
+
in the following executable "stuff" will not output when
|
215
|
+
`--help` is used.
|
216
|
+
|
217
|
+
```js
|
218
|
+
#!/usr/bin/env node
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Module dependencies.
|
222
|
+
*/
|
223
|
+
|
224
|
+
var program = require('commander');
|
225
|
+
|
226
|
+
program
|
227
|
+
.version('0.0.1')
|
228
|
+
.option('-f, --foo', 'enable some foo')
|
229
|
+
.option('-b, --bar', 'enable some bar')
|
230
|
+
.option('-B, --baz', 'enable some baz');
|
231
|
+
|
232
|
+
// must be before .parse() since
|
233
|
+
// node's emit() is immediate
|
234
|
+
|
235
|
+
program.on('--help', function(){
|
236
|
+
console.log(' Examples:');
|
237
|
+
console.log('');
|
238
|
+
console.log(' $ custom-help --help');
|
239
|
+
console.log(' $ custom-help -h');
|
240
|
+
console.log('');
|
241
|
+
});
|
242
|
+
|
243
|
+
program.parse(process.argv);
|
244
|
+
|
245
|
+
console.log('stuff');
|
246
|
+
```
|
247
|
+
|
248
|
+
Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:
|
249
|
+
|
250
|
+
```
|
251
|
+
|
252
|
+
Usage: custom-help [options]
|
253
|
+
|
254
|
+
Options:
|
255
|
+
|
256
|
+
-h, --help output usage information
|
257
|
+
-V, --version output the version number
|
258
|
+
-f, --foo enable some foo
|
259
|
+
-b, --bar enable some bar
|
260
|
+
-B, --baz enable some baz
|
261
|
+
|
262
|
+
Examples:
|
263
|
+
|
264
|
+
$ custom-help --help
|
265
|
+
$ custom-help -h
|
266
|
+
|
267
|
+
```
|
268
|
+
|
269
|
+
## .outputHelp()
|
270
|
+
|
271
|
+
Output help information without exiting.
|
272
|
+
|
273
|
+
If you want to display help by default (e.g. if no command was provided), you can use something like:
|
274
|
+
|
275
|
+
```js
|
276
|
+
var program = require('commander');
|
277
|
+
|
278
|
+
program
|
279
|
+
.version('0.0.1')
|
280
|
+
.command('getstream [url]', 'get stream URL')
|
281
|
+
.parse(process.argv);
|
282
|
+
|
283
|
+
if (!process.argv.slice(2).length) {
|
284
|
+
program.outputHelp();
|
285
|
+
}
|
286
|
+
```
|
287
|
+
|
288
|
+
## .help()
|
289
|
+
|
290
|
+
Output help information and exit immediately.
|
291
|
+
|
292
|
+
## Examples
|
293
|
+
|
294
|
+
```js
|
295
|
+
var program = require('commander');
|
296
|
+
|
297
|
+
program
|
298
|
+
.version('0.0.1')
|
299
|
+
.option('-C, --chdir <path>', 'change the working directory')
|
300
|
+
.option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
|
301
|
+
.option('-T, --no-tests', 'ignore test hook')
|
302
|
+
|
303
|
+
program
|
304
|
+
.command('setup [env]')
|
305
|
+
.description('run setup commands for all envs')
|
306
|
+
.option("-s, --setup_mode [mode]", "Which setup mode to use")
|
307
|
+
.action(function(env, options){
|
308
|
+
var mode = options.setup_mode || "normal";
|
309
|
+
env = env || 'all';
|
310
|
+
console.log('setup for %s env(s) with %s mode', env, mode);
|
311
|
+
});
|
312
|
+
|
313
|
+
program
|
314
|
+
.command('exec <cmd>')
|
315
|
+
.alias('ex')
|
316
|
+
.description('execute the given remote cmd')
|
317
|
+
.option("-e, --exec_mode <mode>", "Which exec mode to use")
|
318
|
+
.action(function(cmd, options){
|
319
|
+
console.log('exec "%s" using %s mode', cmd, options.exec_mode);
|
320
|
+
}).on('--help', function() {
|
321
|
+
console.log(' Examples:');
|
322
|
+
console.log();
|
323
|
+
console.log(' $ deploy exec sequential');
|
324
|
+
console.log(' $ deploy exec async');
|
325
|
+
console.log();
|
326
|
+
});
|
327
|
+
|
328
|
+
program
|
329
|
+
.command('*')
|
330
|
+
.action(function(env){
|
331
|
+
console.log('deploying "%s"', env);
|
332
|
+
});
|
333
|
+
|
334
|
+
program.parse(process.argv);
|
335
|
+
```
|
336
|
+
|
337
|
+
More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
|
338
|
+
|
339
|
+
## License
|
340
|
+
|
341
|
+
MIT
|
342
|
+
|