mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-06-26 13:51:05 +01:00
CONVERT: Improve command consistency.
This commit is contained in:
4
dist/cli/error.js
vendored
4
dist/cli/error.js
vendored
@ -258,6 +258,10 @@ Error-handling routines for HackMyResume.
|
||||
case HMSTATUS.optionsFileNotFound:
|
||||
msg = M2C(this.msgs.optionsFileNotFound.msg);
|
||||
etype = 'error';
|
||||
break;
|
||||
case HMSTATUS.unknownSchema:
|
||||
msg = M2C(this.msgs.unknownSchema.msg[0]);
|
||||
etype = 'error';
|
||||
}
|
||||
return {
|
||||
msg: msg,
|
||||
|
9
dist/cli/main.js
vendored
9
dist/cli/main.js
vendored
@ -257,9 +257,16 @@ Definition of the `main` function.
|
||||
|
||||
executeFail = function(err) {
|
||||
var finalErrorCode, msgs;
|
||||
console.dir(err);
|
||||
finalErrorCode = -1;
|
||||
if (err) {
|
||||
finalErrorCode = err.fluenterror ? err.fluenterror : err;
|
||||
if (err.fluenterror) {
|
||||
finalErrorCode = err.fluenterror;
|
||||
} else if (err.length) {
|
||||
finalErrorCode = err[0].fluenterror;
|
||||
} else {
|
||||
finalErrorCode = err;
|
||||
}
|
||||
}
|
||||
if (_opts.debug) {
|
||||
msgs = require('./msg').errors;
|
||||
|
17
dist/cli/msg.yml
vendored
17
dist/cli/msg.yml
vendored
@ -115,3 +115,20 @@ errors:
|
||||
- "\nMake sure the options file contains valid JSON."
|
||||
optionsFileNotFound:
|
||||
msg: "The specified options file is missing or inaccessible."
|
||||
unknownSchema:
|
||||
msg:
|
||||
- "Unknown resume schema. Did you specify a valid FRESH or JRS resume?"
|
||||
- |
|
||||
At a minimum, a FRESH resume must include a "name" field and a "meta"
|
||||
property.
|
||||
|
||||
"name": "John Doe",
|
||||
"meta": {
|
||||
"format": "FRESH@0.1.0"
|
||||
}
|
||||
|
||||
JRS-format resumes must include a "basics" section with a "name":
|
||||
|
||||
"basics": {
|
||||
"name": "John Doe"
|
||||
}
|
||||
|
2
dist/cli/out.js
vendored
2
dist/cli/out.js
vendored
@ -128,7 +128,7 @@ Output routines for HackMyResume.
|
||||
output = template(info);
|
||||
return this.log(chalk.cyan(output));
|
||||
case HME.beforeConvert:
|
||||
return L(M2C(this.msgs.beforeConvert.msg, 'green'), evt.srcFile, evt.srcFmt, evt.dstFile, evt.dstFmt);
|
||||
return L(M2C(this.msgs.beforeConvert.msg, evt.error ? 'red' : 'green'), evt.srcFile, evt.srcFmt, evt.dstFile, evt.dstFmt);
|
||||
case HME.afterInlineConvert:
|
||||
return L(M2C(this.msgs.afterInlineConvert.msg, 'gray', 'white.dim'), evt.file, evt.fmt);
|
||||
case HME.afterValidate:
|
||||
|
Reference in New Issue
Block a user