Skip to content
Myr

Merge pull request #619 from Nepomuceno/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

On SemVer you do not start from 0.0.1

authored by Zhiye Li · committed by GitHub · parents 3367806, 20493bb · Browse files · 1 file+9 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−9 removed

  • other:+9 added−9 removed

1 file+9 added−9 removed

modified:Readme.md+9 added-9 removed
26 unmodified lines
2728var program = require('commander');2930program31 .version('0.0.1')31 .version('0.1.0')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')
29 unmodified lines
65 return total + 1;66}6768program69 .version('0.0.1')69 .version('0.1.0')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)
16 unmodified lines
9091## Regular Expression92```js93program94 .version('0.0.1')94 .version('0.1.0')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
15 unmodified lines
114115var program = require('commander');116117program118 .version('0.0.1')118 .version('0.1.0')119 .command('rmdir <dir> [otherDirs...]')120 .action(function (dir, otherDirs) {121 console.log('rmdir %s', dir);122 if (otherDirs) {
16 unmodified lines
139140var program = require('../');141142program143 .version('0.0.1')143 .version('0.1.0')144 .arguments('<cmd> [env]')145 .action(function (cmd, env) {146 cmdValue = cmd;147 envValue = env;
16 unmodified lines
164// file: ./examples/pm165var program = require('..');166167program168 .version('0.0.1')168 .version('0.1.0')169 .command('install [name]', 'install one or more packages')170 .command('search [query]', 'search with optional query')171 .command('list', 'list packages installed', {isDefault: true})172 .parse(process.argv);
53 unmodified lines
226227var program = require('commander');228229program230 .version('0.0.1')230 .version('0.1.0')231 .option('-f, --foo', 'enable some foo')232 .option('-b, --bar', 'enable some bar')233 .option('-B, --baz', 'enable some baz');234
45 unmodified lines
280var program = require('commander');281var colors = require('colors');282283program284 .version('0.0.1')284 .version('0.1.0')285 .command('getstream [url]', 'get stream URL')286 .parse(process.argv);287288 if (!process.argv.slice(2).length) {
15 unmodified lines
304```js305var program = require('commander');306307program308 .version('0.0.1')308 .version('0.1.0')309 .option('-C, --chdir <path>', 'change the working directory')310 .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')311 .option('-T, --no-tests', 'ignore test hook');312
40 unmodified lines