Skip to content

Commit

Permalink
Integrate HMC.
Browse files Browse the repository at this point in the history
  • Loading branch information
hacksalot committed Jan 27, 2016
1 parent 4440d23 commit beb60d4
Show file tree
Hide file tree
Showing 62 changed files with 5,697 additions and 31 deletions.
12 changes: 9 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@ module.exports = function (grunt) {
main: {
expand: true,
cwd: 'src',
src: ['**/*','!**/*.coffee'],
src: ['**/*','!**/*.coffee','!hmc/**'],
dest: 'dist/',
},
core: {
expand: true,
cwd: 'src',
src: ['hmc/dist/**/*','hmc/package.json'],
dest: 'dist/',
}
},

coffee: {
main: {
expand: true,
cwd: 'src',
src: ['**/*.coffee'],
src: ['cli/**/*.coffee'],
dest: 'dist/',
ext: '.js'
}
Expand Down Expand Up @@ -69,7 +75,7 @@ module.exports = function (grunt) {
laxcomma: true,
expr: true
},
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js']
all: ['Gruntfile.js', 'dist/cli/**/*.js', 'test/*.js']
}

};
Expand Down
8 changes: 4 additions & 4 deletions dist/cli/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('hackmycore/dist/core/status-codes');
HMSTATUS = require('../hmc/dist/core/status-codes');

PKG = require('../../package.json');

FS = require('fs');

FCMD = require('hackmycore');
FCMD = require('../hmc');

PATH = require('path');

WRAP = require('word-wrap');

M2C = require('hackmycore/dist/utils/md2chalk.js');
M2C = require('../hmc/dist/utils/md2chalk.js');

chalk = require('chalk');

Expand All @@ -30,7 +30,7 @@ Error-handling routines for HackMyResume.

printf = require('printf');

SyntaxErrorEx = require('hackmycore/dist/utils/syntax-error-ex');
SyntaxErrorEx = require('../hmc/dist/utils/syntax-error-ex');

require('string.prototype.startswith');

Expand Down
10 changes: 5 additions & 5 deletions dist/cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('hackmycore');
HMR = require('../hmc');

PKG = require('../../package.json');

Expand All @@ -20,13 +20,13 @@ Definition of the `main` function.

PATH = require('path');

HMSTATUS = require('hackmycore/dist/core/status-codes');
HMSTATUS = require('../hmc/dist/core/status-codes');

HME = require('hackmycore/dist/core/event-codes');
HME = require('../hmc/dist/core/event-codes');

safeLoadJSON = require('hackmycore/dist/utils/safe-json-loader');
safeLoadJSON = require('../hmc/dist/utils/safe-json-loader');

StringUtils = require('hackmycore/dist/utils/string.js');
StringUtils = require('../hmc/dist/utils/string.js');

_ = require('underscore');

Expand Down
10 changes: 5 additions & 5 deletions dist/cli/out.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Output routines for HackMyResume.

chalk = require('chalk');

HME = require('hackmycore/dist/core/event-codes');
HME = require('../hmc/dist/core/event-codes');

_ = require('underscore');

Class = require('hackmycore/dist/utils/class.js');
Class = require('../hmc/dist/utils/class.js');

M2C = require('hackmycore/dist/utils/md2chalk.js');
M2C = require('../hmc/dist/utils/md2chalk.js');

PATH = require('path');

Expand All @@ -42,7 +42,7 @@ Output routines for HackMyResume.
OutputHandler = module.exports = Class.extend({
init: function(opts) {
this.opts = EXTEND(true, this.opts || {}, opts);
return this.msgs = YAML.load(PATH.join(__dirname, 'msg.yml')).events;
this.msgs = YAML.load(PATH.join(__dirname, 'msg.yml')).events;
},
log: function(msg) {
var finished;
Expand Down Expand Up @@ -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('hackmycore/dist/helpers/console-helpers'));
HANDLEBARS.registerHelper(require('../hmc/dist/helpers/console-helpers'));
template = HANDLEBARS.compile(rawTpl, {
strict: false,
assumeObjects: false
Expand Down
60 changes: 60 additions & 0 deletions dist/hmc/dist/core/default-formats.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

/*
Event code definitions.
@module core/default-formats
@license MIT. See LICENSE.md for details.
*/


/** Supported resume formats. */

(function() {
module.exports = [
{
name: 'html',
ext: 'html',
gen: new (require('../generators/html-generator'))()
}, {
name: 'txt',
ext: 'txt',
gen: new (require('../generators/text-generator'))()
}, {
name: 'doc',
ext: 'doc',
fmt: 'xml',
gen: new (require('../generators/word-generator'))()
}, {
name: 'pdf',
ext: 'pdf',
fmt: 'html',
is: false,
gen: new (require('../generators/html-pdf-cli-generator'))()
}, {
name: 'png',
ext: 'png',
fmt: 'html',
is: false,
gen: new (require('../generators/html-png-generator'))()
}, {
name: 'md',
ext: 'md',
fmt: 'txt',
gen: new (require('../generators/markdown-generator'))()
}, {
name: 'json',
ext: 'json',
gen: new (require('../generators/json-generator'))()
}, {
name: 'yml',
ext: 'yml',
fmt: 'yml',
gen: new (require('../generators/json-yaml-generator'))()
}, {
name: 'latex',
ext: 'tex',
fmt: 'latex',
gen: new (require('../generators/latex-generator'))()
}
];

}).call(this);
18 changes: 18 additions & 0 deletions dist/hmc/dist/core/default-options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

/*
Event code definitions.
@module core/default-options
@license MIT. See LICENSE.md for details.
*/

(function() {
module.exports = {
theme: 'modern',
prettify: {
indent_size: 2,
unformatted: ['em', 'strong'],
max_char: 80
}
};

}).call(this);
77 changes: 77 additions & 0 deletions dist/hmc/dist/core/empty-jrs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"basics": {
"name": "",
"label": "",
"picture": "",
"email": "",
"phone": "",
"degree": "",
"website": "",
"summary": "",
"location": {
"address": "",
"postalCode": "",
"city": "",
"countryCode": "",
"region": ""
},
"profiles": [{
"network": "",
"username": "",
"url": ""
}]
},

"work": [{
"company": "",
"position": "",
"website": "",
"startDate": "",
"endDate": "",
"summary": "",
"highlights": [
""
]
}],

"awards": [{
"title": "",
"date": "",
"awarder": "",
"summary": ""
}],

"education": [{
"institution": "",
"area": "",
"studyType": "",
"startDate": "",
"endDate": "",
"gpa": "",
"courses": [ "" ]
}],

"publications": [{
"name": "",
"publisher": "",
"releaseDate": "",
"website": "",
"summary": ""
}],

"volunteer": [{
"organization": "",
"position": "",
"website": "",
"startDate": "",
"endDate": "",
"summary": "",
"highlights": [ "" ]
}],

"skills": [{
"name": "",
"level": "",
"keywords": [""]
}]
}
39 changes: 39 additions & 0 deletions dist/hmc/dist/core/event-codes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

/*
Event code definitions.
@module core/event-codes
@license MIT. See LICENSE.md for details.
*/

(function() {
module.exports = {
error: -1,
success: 0,
begin: 1,
end: 2,
beforeRead: 3,
afterRead: 4,
beforeCreate: 5,
afterCreate: 6,
beforeTheme: 7,
afterTheme: 8,
beforeMerge: 9,
afterMerge: 10,
beforeGenerate: 11,
afterGenerate: 12,
beforeAnalyze: 13,
afterAnalyze: 14,
beforeConvert: 15,
afterConvert: 16,
verifyOutputs: 17,
beforeParse: 18,
afterParse: 19,
beforePeek: 20,
afterPeek: 21,
beforeInlineConvert: 22,
afterInlineConvert: 23,
beforeValidate: 24,
afterValidate: 25
};

}).call(this);
Loading

0 comments on commit beb60d4

Please sign in to comment.