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

Refactor API interface.

This commit is contained in:
hacksalot
2016-01-04 07:23:20 -05:00
parent a8fed1b69b
commit ce75f09210
12 changed files with 98 additions and 113 deletions

View File

@ -11,7 +11,7 @@ Command-line interface (CLI) for HackMyResume.
var SPAWNW = require('./core/spawn-watch')
, FCMD = require( './hackmycmd')
, HMR = require( './hackmyapi')
, PKG = require('../package.json')
, FS = require('fs')
, EXTEND = require('./utils/extend')
@ -139,7 +139,7 @@ function initialize() {
}
// Handle invalid verbs here (a bit easier here than in commander.js)...
if( verb && !FCMD.verbs[ verb ] && !FCMD.alias[ verb ] ) {
if( verb && !HMR.verbs[ verb ] && !HMR.alias[ verb ] ) {
throw { fluenterror: HACKMYSTATUS.invalidCommand, shouldExit: true,
attempted: oVerb };
}
@ -165,7 +165,7 @@ Invoke a HackMyResume verb.
*/
function execVerb( src, dst, opts, log ) {
loadOptions.call( this, opts );
FCMD.verbs[ this.name() ].call( null, src, dst, _opts, log );
HMR.verbs[ this.name() ].call( null, src, dst, _opts, log );
}