Skip to content

Commit acff65b

Browse files
committed
add --version to marked bin
1 parent a685251 commit acff65b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/marked

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ function help() {
3232
});
3333
}
3434

35+
function version() {
36+
var pkg = require('../package.json');
37+
console.log(pkg.version);
38+
}
39+
3540
/**
3641
* Main
3742
*/
@@ -98,6 +103,9 @@ function main(argv, callback) {
98103
case '-h':
99104
case '--help':
100105
return help();
106+
case '-v':
107+
case '--version':
108+
return version();
101109
default:
102110
if (arg.indexOf('--') === 0) {
103111
opt = camelize(arg.replace(/^--(no-)?/, ''));

0 commit comments

Comments
 (0)