mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-02 20:37:08 +01:00
Numerous fixes.
This commit is contained in:
4
dist/core/jrs-resume.js
vendored
4
dist/core/jrs-resume.js
vendored
@ -36,7 +36,7 @@ Definition of the JRSResume class.
|
||||
*/
|
||||
|
||||
JRSResume = (function(superClass) {
|
||||
var clear, format;
|
||||
var clear;
|
||||
|
||||
extend1(JRSResume, superClass);
|
||||
|
||||
@ -135,7 +135,7 @@ Definition of the JRSResume class.
|
||||
|
||||
/** Return the resume format. */
|
||||
|
||||
format = function() {
|
||||
JRSResume.prototype.format = function() {
|
||||
return 'JRS';
|
||||
};
|
||||
|
||||
|
4
dist/core/jrs-theme.js
vendored
4
dist/core/jrs-theme.js
vendored
@ -49,7 +49,7 @@ Definition of the JRSTheme class.
|
||||
{
|
||||
action: 'transform',
|
||||
render: this.render,
|
||||
major: true,
|
||||
primary: true,
|
||||
ext: 'html',
|
||||
css: null
|
||||
}
|
||||
@ -61,7 +61,7 @@ Definition of the JRSTheme class.
|
||||
{
|
||||
action: 'transform',
|
||||
render: this.render,
|
||||
major: true,
|
||||
primary: true,
|
||||
ext: 'pdf',
|
||||
css: null
|
||||
}
|
||||
|
2
dist/generators/html-pdf-cli-generator.js
vendored
2
dist/generators/html-pdf-cli-generator.js
vendored
@ -43,7 +43,7 @@ Definition of the HtmlPdfCLIGenerator class.
|
||||
|
||||
HtmlPdfCLIGenerator.prototype.onBeforeSave = function(info) {
|
||||
var safe_eng;
|
||||
if (info.ext !== 'html') {
|
||||
if (info.ext !== 'html' && info.ext !== 'pdf') {
|
||||
return info.mk;
|
||||
}
|
||||
safe_eng = info.opts.pdf || 'wkhtmltopdf';
|
||||
|
22
dist/generators/json-generator.js
vendored
22
dist/generators/json-generator.js
vendored
@ -6,7 +6,7 @@ Definition of the JsonGenerator class.
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var BaseGenerator, FS, JsonGenerator, _,
|
||||
var BaseGenerator, FJCV, FS, JsonGenerator, _,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
@ -16,8 +16,10 @@ Definition of the JsonGenerator class.
|
||||
|
||||
_ = require('underscore');
|
||||
|
||||
FJCV = require('fresh-jrs-converter');
|
||||
|
||||
/** The JsonGenerator generates a JSON resume directly. */
|
||||
|
||||
/** The JsonGenerator generates a FRESH or JRS resume as an output. */
|
||||
|
||||
module.exports = JsonGenerator = (function(superClass) {
|
||||
extend(JsonGenerator, superClass);
|
||||
@ -26,20 +28,10 @@ Definition of the JsonGenerator class.
|
||||
JsonGenerator.__super__.constructor.call(this, 'json');
|
||||
}
|
||||
|
||||
JsonGenerator.prototype.keys = ['imp', 'warnings', 'computed', 'filt', 'ctrl', 'index', 'safeStartDate', 'safeEndDate', 'safeDate', 'safeReleaseDate', 'result', 'isModified', 'htmlPreview', 'safe'];
|
||||
|
||||
JsonGenerator.prototype.invoke = function(rez) {
|
||||
var replacer;
|
||||
replacer = function(key, value) {
|
||||
if (_.some(this.keys, function(val) {
|
||||
return key.trim() === val;
|
||||
})) {
|
||||
return void 0;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
return JSON.stringify(rez, replacer, 2);
|
||||
var altRez;
|
||||
altRez = FJCV['to' + (rez.format() === 'FRESH' ? 'JRS' : 'FRESH')](rez);
|
||||
return altRez = FJCV.toSTRING(altRez);
|
||||
};
|
||||
|
||||
JsonGenerator.prototype.generate = function(rez, f) {
|
||||
|
Reference in New Issue
Block a user