Skip to content

Commit

Permalink
add --version to marked bin
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 12, 2019
1 parent a685251 commit acff65b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/marked
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function help() {
});
}

function version() {
var pkg = require('../package.json');
console.log(pkg.version);
}

/**
* Main
*/
Expand Down Expand Up @@ -98,6 +103,9 @@ function main(argv, callback) {
case '-h':
case '--help':
return help();
case '-v':
case '--version':
return version();
default:
if (arg.indexOf('--') === 0) {
opt = camelize(arg.replace(/^--(no-)?/, ''));
Expand Down

0 comments on commit acff65b

Please sign in to comment.