1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-09 11:41:07 +01:00

Refactor command processing.

This commit is contained in:
hacksalot
2016-01-02 00:15:46 -05:00
parent 47553b6def
commit a95b52acd0
8 changed files with 74 additions and 60 deletions

View File

@ -17,7 +17,7 @@ var SPAWNW = require('./core/spawn-watch')
, PATH = require('path')
, HACKMYSTATUS = require('./core/status-codes')
, opts = { }
, title = chalk.white('\n*** HackMyResume v' + PKG.version + ' ***')
, title = chalk.white.bold('\n*** HackMyResume v' + PKG.version + ' ***')
, _ = require('underscore');
@ -61,7 +61,6 @@ function main() {
// Massage inputs and outputs
var src = a._.slice(1, splitAt === -1 ? undefined : splitAt );
var dst = splitAt === -1 ? [] : a._.slice( splitAt + 1 );
( splitAt === -1 ) && (src.length > 1) && (verb !== 'validate') && dst.push( src.pop() ); // Allow omitting TO keyword
// Invoke the action
(FCMD.verbs[verb] || FCMD.alias[verb]).apply(null, [src, dst, opts, logMsg]);