mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-25 01:40:10 +00:00
Reverted the compiled JS to avoid merge conflicts
This commit is contained in:
parent
3c166a21a0
commit
ba6b8d45f5
0
dist/cli/index.js
vendored
Executable file → Normal file
0
dist/cli/index.js
vendored
Executable file → Normal file
4
dist/cli/main.js
vendored
4
dist/cli/main.js
vendored
@ -76,7 +76,7 @@ Definition of the `main` function.
|
||||
x = splitSrcDest.call(this);
|
||||
execute.call(this, x.src, x.dst, this.opts(), logMsg);
|
||||
});
|
||||
program.command('analyze')["arguments"]('<sources...>').option('--private', 'Include resume fields marked as private', false).description('Analyze one or more resumes.').action(function(sources) {
|
||||
program.command('analyze')["arguments"]('<sources...>').description('Analyze one or more resumes.').action(function(sources) {
|
||||
execute.call(this, sources, [], this.opts(), logMsg);
|
||||
});
|
||||
program.command('peek')["arguments"]('<sources...>').description('Peek at a resume field or section').action(function(sources, sectionOrField) {
|
||||
@ -84,7 +84,7 @@ Definition of the `main` function.
|
||||
dst = sources && sources.length > 1 ? [sources.pop()] : [];
|
||||
execute.call(this, sources, dst, this.opts(), logMsg);
|
||||
});
|
||||
program.command('build').alias('generate').option('-t --theme <theme>', 'Theme name or path').option('-n --no-prettify', 'Disable HTML prettification', true).option('-c --css <option>', 'CSS linking / embedding').option('-p --pdf <engine>', 'PDF generation engine').option('--no-sort', 'Sort resume sections by date', false).option('--tips', 'Display theme tips and warnings.', false).option('--private', 'Include resume fields marked as private', false).description('Generate resume to multiple formats').action(function(sources, targets, options) {
|
||||
program.command('build').alias('generate').option('-t --theme <theme>', 'Theme name or path').option('-n --no-prettify', 'Disable HTML prettification', true).option('-c --css <option>', 'CSS linking / embedding').option('-p --pdf <engine>', 'PDF generation engine').option('--no-sort', 'Sort resume sections by date', false).option('--tips', 'Display theme tips and warnings.', false).description('Generate resume to multiple formats').action(function(sources, targets, options) {
|
||||
var x;
|
||||
x = splitSrcDest.call(this);
|
||||
execute.call(this, x.src, x.dst, this.opts(), logMsg);
|
||||
|
1
dist/cli/use.txt
vendored
1
dist/cli/use.txt
vendored
@ -19,7 +19,6 @@ Available options:
|
||||
--format -f The format (FRESH or JSON Resume) to use.
|
||||
--debug -d Emit extended debugging info.
|
||||
--assert -a Treat resume validation warnings as errors.
|
||||
--private Include resume fields marked as private
|
||||
--no-colors Disable terminal colors.
|
||||
--tips Display theme messages and tips.
|
||||
--help -h Display help documentation.
|
||||
|
35
dist/core/abstract-resume.js
vendored
35
dist/core/abstract-resume.js
vendored
@ -62,41 +62,6 @@ Definition of the AbstractResume class.
|
||||
return lastDate.diff(firstDate, unit);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Removes ignored or private fields from a resume object
|
||||
@returns an object with the following structure:
|
||||
{
|
||||
scrubbed: the processed resume object
|
||||
ignoreList: an array of ignored nodes that were removed
|
||||
privateList: an array of private nodes that were removed
|
||||
}
|
||||
*/
|
||||
|
||||
AbstractResume.prototype.scrubResume = function(rep, opts) {
|
||||
var ignoreList, includePrivates, privateList, scrubbed, traverse;
|
||||
traverse = require('traverse');
|
||||
ignoreList = [];
|
||||
privateList = [];
|
||||
includePrivates = (opts != null ? opts["private"] : void 0) == null ? true : opts != null ? opts["private"] : void 0;
|
||||
scrubbed = traverse(rep).map(function(x) {
|
||||
if (!this.isLeaf) {
|
||||
if (this.node.ignore === true || this.node.ignore === 'true') {
|
||||
ignoreList.push(this.node);
|
||||
return this.remove();
|
||||
} else if ((this.node["private"] === true || this.node["private"] === 'true') && !includePrivates) {
|
||||
privateList.push(this.node);
|
||||
return this.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
return {
|
||||
scrubbed: scrubbed,
|
||||
ingoreList: ignoreList,
|
||||
privateList: privateList
|
||||
};
|
||||
};
|
||||
|
||||
return AbstractResume;
|
||||
|
||||
})();
|
||||
|
15
dist/core/fresh-resume.js
vendored
15
dist/core/fresh-resume.js
vendored
@ -77,11 +77,20 @@ Definition of the FRESHResume class.
|
||||
*/
|
||||
|
||||
FreshResume.prototype.parseJSON = function(rep, opts) {
|
||||
var ignoreList, privateList, ref, ref1, scrubbed, that;
|
||||
var ignoreList, ref, scrubbed, that, traverse;
|
||||
that = this;
|
||||
ref = this.scrubResume(rep, opts), scrubbed = ref.scrubbed, ignoreList = ref.ignoreList, privateList = ref.privateList;
|
||||
traverse = require('traverse');
|
||||
ignoreList = [];
|
||||
scrubbed = traverse(rep).map(function(x) {
|
||||
if (!this.isLeaf && this.node.ignore) {
|
||||
if (this.node.ignore === true || this.node.ignore === 'true') {
|
||||
ignoreList.push(this.node);
|
||||
return this.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
extend(true, this, scrubbed);
|
||||
if (!((ref1 = this.imp) != null ? ref1.processed : void 0)) {
|
||||
if (!((ref = this.imp) != null ? ref.processed : void 0)) {
|
||||
opts = opts || {};
|
||||
if (opts.imp === void 0 || opts.imp) {
|
||||
this.imp = this.imp || {};
|
||||
|
15
dist/core/jrs-resume.js
vendored
15
dist/core/jrs-resume.js
vendored
@ -71,12 +71,21 @@ Definition of the JRSResume class.
|
||||
*/
|
||||
|
||||
JRSResume.prototype.parseJSON = function(rep, opts) {
|
||||
var ignoreList, privateList, ref, ref1, scrubbed, that;
|
||||
var ignoreList, ref, scrubbed, that, traverse;
|
||||
opts = opts || {};
|
||||
that = this;
|
||||
ref = this.scrubResume(rep, opts), scrubbed = ref.scrubbed, ignoreList = ref.ignoreList, privateList = ref.privateList;
|
||||
traverse = require('traverse');
|
||||
ignoreList = [];
|
||||
scrubbed = traverse(rep).map(function(x) {
|
||||
if (!this.isLeaf && this.node.ignore) {
|
||||
if (this.node.ignore === true || this.node.ignore === 'true') {
|
||||
ignoreList.push(this.node);
|
||||
return this.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
extend(true, this, scrubbed);
|
||||
if (!((ref1 = this.imp) != null ? ref1.processed : void 0)) {
|
||||
if (!((ref = this.imp) != null ? ref.processed : void 0)) {
|
||||
opts = opts || {};
|
||||
if (opts.imp === void 0 || opts.imp) {
|
||||
this.imp = this.imp || {};
|
||||
|
5
dist/verbs/analyze.js
vendored
5
dist/verbs/analyze.js
vendored
@ -56,10 +56,7 @@ Implementation of the 'analyze' verb for HackMyResume.
|
||||
var r;
|
||||
r = ResumeFactory.loadOne(src, {
|
||||
format: 'FRESH',
|
||||
objectify: true,
|
||||
inner: {
|
||||
"private": opts["private"] === true
|
||||
}
|
||||
objectify: true
|
||||
}, this);
|
||||
if (opts.assert && this.hasError()) {
|
||||
return {};
|
||||
|
8
dist/verbs/build.js
vendored
8
dist/verbs/build.js
vendored
@ -109,8 +109,7 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
objectify: false,
|
||||
quit: true,
|
||||
inner: {
|
||||
sort: _opts.sort,
|
||||
"private": _opts["private"]
|
||||
sort: _opts.sort
|
||||
}
|
||||
}, this);
|
||||
problemSheets = _.filter(sheetObjects, function(so) {
|
||||
@ -199,9 +198,7 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
r: rez,
|
||||
theme: theme
|
||||
});
|
||||
_rezObj = new RTYPES[toFormat]().parseJSON(rez, {
|
||||
"private": _opts["private"]
|
||||
});
|
||||
_rezObj = new RTYPES[toFormat]().parseJSON(rez);
|
||||
targets = _expand(dst, theme);
|
||||
_.each(targets, function(t) {
|
||||
var ref;
|
||||
@ -236,7 +233,6 @@ Implementation of the 'build' verb for HackMyResume.
|
||||
var that;
|
||||
_opts.theme = (opts.theme && opts.theme.toLowerCase().trim()) || 'modern';
|
||||
_opts.prettify = opts.prettify === true;
|
||||
_opts["private"] = opts["private"] === true;
|
||||
_opts.css = opts.css;
|
||||
_opts.pdf = opts.pdf;
|
||||
_opts.wrap = opts.wrap || 60;
|
||||
|
5
dist/verbs/convert.js
vendored
5
dist/verbs/convert.js
vendored
@ -92,10 +92,7 @@ Implementation of the 'convert' verb for HackMyResume.
|
||||
var rinfo, s, srcFmt, targetFormat;
|
||||
rinfo = ResumeFactory.loadOne(src, {
|
||||
format: null,
|
||||
objectify: true,
|
||||
inner: {
|
||||
"private": false
|
||||
}
|
||||
objectify: true
|
||||
});
|
||||
if (rinfo.fluenterror) {
|
||||
return rinfo;
|
||||
|
Loading…
Reference in New Issue
Block a user