From e1a63fb54844b4d72b631de5ccecc4613e03cb3d Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 20 Nov 2014 12:13:59 -0400 Subject: [PATCH] Implement version module --- lib/actions/version.coffee | 4 ++++ lib/app.coffee | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lib/actions/version.coffee diff --git a/lib/actions/version.coffee b/lib/actions/version.coffee new file mode 100644 index 00000000..10ed4217 --- /dev/null +++ b/lib/actions/version.coffee @@ -0,0 +1,4 @@ +packageJSON = require('../../package.json') + +exports.version = -> + console.log(packageJSON.version) diff --git a/lib/app.coffee b/lib/app.coffee index de84d067..88960947 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -1,4 +1,3 @@ -packageJSON = require('../package.json') data = require('./data/data') config = require('./config') @@ -28,6 +27,10 @@ yargs.command('devices ', device.list) preferences = require('./actions/preferences') yargs.command('preferences', preferences.preferences) +# ---------- Version Module ---------- +version = require('./actions/version') +yargs.command('version', version.version) + data.prefix.set config.dataPrefix, (error) -> throw error if error? yargs.command.run()