Skip to content

Commit

Permalink
adds shorthand helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed Sep 17, 2014
1 parent 7b02fa7 commit 76a1fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/middleware/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = [
require("./help"),
require("./shorthand"),
require("./project"),
require("./creds"),
require("./auth"),
Expand Down
9 changes: 9 additions & 0 deletions lib/middleware/shorthand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var path = require("path")
var fs = require("fs")
var helpers = require("./util/helpers")

module.exports = function(req, next){
req.argv.project = req.argv.p = req.argv.project || req.argv.p || req.argv["_"][0] || null
req.argv.domain = req.argv.d = req.argv.domain || req.argv.d || req.argv["_"][1] || null
next()
}

0 comments on commit 76a1fc7

Please sign in to comment.