Skip to content

Commit

Permalink
Merge pull request #10 from jerrywdlee/update-options-200128
Browse files Browse the repository at this point in the history
Update options 200128
  • Loading branch information
jerrywdlee committed Jan 28, 2020
2 parents d0f501e + df742b1 commit db7da1b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@ $ clipy-mate

```sh
# helper
$ clipy-mate -h
# Or
$ clipy-mate --help

# Version
$ clipy-mate -v
# Or
$ clipy-mate --version

# Create or Update GitHub Settings
$ clipy-mate -e -t <YOUR TOKEN> [-g <YOUR GIST ID>]

Expand Down
12 changes: 7 additions & 5 deletions lib/argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ const yargs = require('yargs');
const usageMsg = '`-e -t <YOUR TOKEN> [-g <YOUR GIST ID>]`';

const options = {
upload: { alias: 'u', describe: 'Upload Snippets' },
merge: { alias: 'm', describe: 'Download And Merge Snippets' },
force: { alias: 'f', describe: `Force Update Snippets ${chalk.bold.red('[Danger!]')}` },
edit: { alias: 'e', describe: `Edit Settings: ${chalk.yellow(usageMsg)}` },
u: { alias: 'upload', describe: 'Upload Snippets' },
m: { alias: 'merge', describe: 'Download And Merge Snippets' },
f: { alias: 'force', describe: `Force Update Snippets ${chalk.bold.red('[Danger!]')}` },
e: { alias: 'edit', describe: `Edit Settings: ${chalk.yellow(usageMsg)}` },
}

const implies = {
edit: 't',
}

const argv = yargs.options(options).implies(implies).help().locale('en').argv;
const argv = yargs.alias('h', 'help').help()
.alias('v', 'version').version(require('../package').version)
.options(options).implies(implies).locale('en').argv;

module.exports = argv;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clipy-mate-cli",
"version": "0.2.3",
"version": "0.3.0",
"description": "Clipy Mate Console Tools",
"repository": "https://github.com/jerrywdlee/clipy-mate-cli",
"main": "index.js",
Expand Down

0 comments on commit db7da1b

Please sign in to comment.