1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 20:37:08 +01:00

Finish HackMyCore reshaping.

Reintroduce HackMyCore, dropping the interim submodule, and reorganize
and improve tests.
This commit is contained in:
hacksalot
2016-01-29 15:23:57 -05:00
parent e9971eb882
commit 0f65e4c9f3
130 changed files with 5384 additions and 337 deletions

8
dist/cli/error.js vendored
View File

@ -8,19 +8,19 @@ Error-handling routines for HackMyResume.
(function() {
var ErrorHandler, FCMD, FS, HMSTATUS, M2C, PATH, PKG, SyntaxErrorEx, WRAP, YAML, _defaultLog, assembleError, chalk, extend, printf;
HMSTATUS = require('../hmc/dist/core/status-codes');
HMSTATUS = require('../core/status-codes');
PKG = require('../../package.json');
FS = require('fs');
FCMD = require('../hmc');
FCMD = require('../index');
PATH = require('path');
WRAP = require('word-wrap');
M2C = require('../hmc/dist/utils/md2chalk.js');
M2C = require('../utils/md2chalk');
chalk = require('chalk');
@ -30,7 +30,7 @@ Error-handling routines for HackMyResume.
printf = require('printf');
SyntaxErrorEx = require('../hmc/dist/utils/syntax-error-ex');
SyntaxErrorEx = require('../utils/syntax-error-ex');
require('string.prototype.startswith');

22
dist/cli/index.js vendored Normal file
View File

@ -0,0 +1,22 @@
#! /usr/bin/env node
/**
Command-line interface (CLI) for HackMyResume.
@license MIT. See LICENSE.md for details.
@module index.js
*/
try {
require('./main')( process.argv );
}
catch( ex ) {
require('./error').err( ex, true );
}

11
dist/cli/main.js vendored
View File

@ -8,7 +8,7 @@ Definition of the `main` function.
(function() {
var Command, EXTEND, FS, HME, HMR, HMSTATUS, OUTPUT, PAD, PATH, PKG, StringUtils, _, _opts, _out, _title, chalk, execute, initOptions, initialize, loadOptions, logMsg, main, safeLoadJSON, splitSrcDest;
HMR = require('../hmc');
HMR = require('../index');
PKG = require('../../package.json');
@ -20,13 +20,13 @@ Definition of the `main` function.
PATH = require('path');
HMSTATUS = require('../hmc/dist/core/status-codes');
HMSTATUS = require('../core/status-codes');
HME = require('../hmc/dist/core/event-codes');
HME = require('../core/event-codes');
safeLoadJSON = require('../hmc/dist/utils/safe-json-loader');
safeLoadJSON = require('../utils/safe-json-loader');
StringUtils = require('../hmc/dist/utils/string.js');
StringUtils = require('../utils/string.js');
_ = require('underscore');
@ -210,6 +210,7 @@ Definition of the `main` function.
});
v.invoke.call(v, src, dst, _opts, log);
if (v.errorCode) {
console.log('Exiting with error code ' + v.errorCode);
return process.exit(v.errorCode);
}
};

8
dist/cli/out.js vendored
View File

@ -10,13 +10,13 @@ Output routines for HackMyResume.
chalk = require('chalk');
HME = require('../hmc/dist/core/event-codes');
HME = require('../core/event-codes');
_ = require('underscore');
Class = require('../hmc/dist/utils/class.js');
Class = require('../utils/class.js');
M2C = require('../hmc/dist/utils/md2chalk.js');
M2C = require('../utils/md2chalk.js');
PATH = require('path');
@ -110,7 +110,7 @@ Output routines for HackMyResume.
case HME.afterAnalyze:
info = evt.info;
rawTpl = FS.readFileSync(PATH.join(__dirname, 'analyze.hbs'), 'utf8');
HANDLEBARS.registerHelper(require('../hmc/dist/helpers/console-helpers'));
HANDLEBARS.registerHelper(require('../helpers/console-helpers'));
template = HANDLEBARS.compile(rawTpl, {
strict: false,
assumeObjects: false