Implement preferences module

This commit is contained in:
Juan Cruz Viotti 2014-11-19 08:59:17 -04:00
parent 76194c7d46
commit 47a1e16dab
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,5 @@
open = require('open')
config = require('../config')
exports.preferences = ->
open(config.urls.preferences)

View File

@ -33,6 +33,15 @@ program
.description('Show a list of your apps')
.action(app.list)
# ---------- Preferences Module ----------
preferences = require('./actions/preferences')
program
.command('preferences')
.description('Open preferences in your web browser')
.action(preferences.preferences)
data.prefix.set config.dataPrefix, (error) ->
throw error if error?
program.parse(process.argv)

View File

@ -14,6 +14,7 @@ config =
config.urls =
signup: '/signup'
preferences: '/preferences'
# Append config.remoteUrl before every url
config.urls = _.object _.map config.urls, (value, key, object) ->