Skip to content

Commit 607b4ac

Browse files
committed
Use package.json for version in yargs
1 parent 7643f4e commit 607b4ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// npm packages
22
const yargs = require('yargs');
33

4+
// version
5+
const pkg = require('../package.json');
6+
47
// our packages
58
const login = require('./commands/login');
69
const deploy = require('./commands/deploy');
@@ -13,7 +16,7 @@ const token = require('./commands/token');
1316

1417
// init program
1518
yargs
16-
.version('0.7.0')
19+
.version(pkg.version)
1720
.completion('completion')
1821
.demand(1)
1922
.help()

0 commit comments

Comments
 (0)