Skip to content

Commit 370be92

Browse files
committed
Load version from package.json. closes #2
1 parent 1283ed6 commit 370be92

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/cli.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{Command} = require "commander"
22
Bang = require "./bang"
33
{exec} = require "child_process"
4+
package = require "../package.json"
45

56
# Command line interface to [Bang](https://github.com/jimmycuadra/bang).
67
module.exports = class CLI
@@ -12,7 +13,7 @@ module.exports = class CLI
1213
@bang = mockBang or new Bang
1314
@program = new Command
1415

15-
@program.version("0.2.1")
16+
@program.version(package.version)
1617
.usage("[options] [key] [value]")
1718
.option("-d, --delete", "delete the specified key")
1819
.option("-h, --help", "get help")

0 commit comments

Comments
 (0)