Skip to content

Commit

Permalink
Replace optimist with yargs, fixes #185
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Oct 5, 2020
1 parent 163e605 commit eafa7d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const optimist = require('optimist');
const commandLineOptions = optimist
const yargs = require('yargs');
const commandLineOptions = yargs
.usage(
'Check your hyperlinks integrities.\n$0 [options] <htmlFile(s) | url(s)>'
)
Expand Down Expand Up @@ -82,7 +82,7 @@ const commandLineOptions = optimist
.wrap(72).argv;

if (commandLineOptions.h) {
optimist.showHelp();
yargs.showHelp();
process.exit(1);
}

Expand Down Expand Up @@ -122,7 +122,7 @@ if (commandLineOptions._.length > 0) {
console.error(
"No input files and no --root specified (or it isn't file:), cannot proceed.\n"
);
optimist.showHelp();
yargs.showHelp();
process.exit(1);
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"assetgraph": "^6.2.0",
"async": "^3.1.0",
"hreftypes": "^1.0.1",
"optimist": "^0.6.1",
"pretty-bytes": "^5.2.0",
"request": "^2.88.0",
"urltools": "^0.4.1"
"urltools": "^0.4.1",
"yargs": "^16.0.3"
},
"devDependencies": {
"coveralls": "^3.0.8",
Expand Down

0 comments on commit eafa7d0

Please sign in to comment.