Move version action to actions/

This commit is contained in:
Juan Cruz Viotti 2015-01-15 11:16:07 -03:00
parent c4da5f0008
commit 72d08ffbbf
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,6 @@
module.exports =
app: require('./app')
info: require('./info')
auth: require('./auth')
device: require('./device')
env: require('./environment-variables')

5
lib/actions/info.coffee Normal file
View File

@ -0,0 +1,5 @@
packageJSON = require('../../package.json')
log = require('../log/log')
exports.version = ->
log.out(packageJSON.version)

View File

@ -2,7 +2,6 @@ _ = require('lodash')
path = require('path')
capitano = require('capitano')
resin = require('resin-sdk')
packageJSON = require('../package.json')
actions = require('./actions')
log = require('./log/log')
errors = require('./errors/errors')
@ -11,8 +10,7 @@ plugin = require('./plugin/plugin')
capitano.command
signature: 'version'
description: 'output the version number'
action: ->
log.out(packageJSON.version)
action: actions.info.version
capitano.command
signature: 'help [command...]'