1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-03 04:47:07 +01:00

Fix generation glitches.

Fix output file name glitch, writing CSS files to destination folder,
and an issue where the process would evaporate before PDF/PNG generation
could complete.
This commit is contained in:
hacksalot
2016-02-13 03:27:11 -05:00
parent 9927e79900
commit 3f8e795c61
11 changed files with 59 additions and 41 deletions

View File

@ -131,11 +131,12 @@ Definition of the FRESHTheme class.
/* Load a single theme file. */
_loadOne = function(absPath, formatsHash, tplFolder) {
var absPathSafe, act, idx, obj, outFmt, pathInfo, portion, ref, ref1, reg, res;
var absPathSafe, act, defFormats, idx, isPrimary, obj, outFmt, pathInfo, portion, ref, ref1, reg, res;
pathInfo = parsePath(absPath);
absPathSafe = absPath.trim().toLowerCase();
outFmt = '';
act = 'copy';
isPrimary = false;
if (this.explicit) {
outFmt = _.find(Object.keys(this.formats), function(fmtKey) {
var fmtVal;
@ -181,6 +182,10 @@ Definition of the FRESHTheme class.
if (!this.explicit) {
act = 'transform';
}
defFormats = require('./default-formats');
isPrimary = _.some(defFormats, function(form) {
return form.name === outFmt && pathInfo.extname !== '.css';
});
}
formatsHash[outFmt] = formatsHash[outFmt] || {
outFormat: outFmt,
@ -191,6 +196,7 @@ Definition of the FRESHTheme class.
}
obj = {
action: act,
primary: isPrimary,
path: absPath,
orgPath: PATH.relative(tplFolder, absPath),
ext: pathInfo.extname.slice(1),