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

Fix JSON Resume theme breakage.

Fixes #128.
This commit is contained in:
hacksalot
2016-01-30 11:31:39 -05:00
parent d69e4635be
commit 1c416f39d3
4 changed files with 74 additions and 69 deletions

View File

@ -6,7 +6,7 @@ Definition of the JRSTheme class.
*/
(function() {
var JRSTheme, PATH, _, getFormat, parsePath, pathExists;
var JRSTheme, PATH, _, parsePath, pathExists;
_ = require('underscore');
@ -25,17 +25,13 @@ Definition of the JRSTheme class.
JRSTheme = (function() {
function JRSTheme() {}
return JRSTheme;
})();
({
/**
Open and parse the specified theme.
@method open
*/
open: function(thFolder) {
JRSTheme.prototype.open = function(thFolder) {
var pathInfo, pkgJsonPath, thApi, thPkg;
this.folder = thFolder;
pathInfo = parsePath(thFolder);
@ -78,25 +74,31 @@ Definition of the JRSTheme class.
};
}
return this;
},
};
/**
Determine if the theme supports the output format.
@method hasFormat
*/
hasFormat: function(fmt) {
JRSTheme.prototype.hasFormat = function(fmt) {
return _.has(this.formats, fmt);
}
};
/**
Return the requested output format.
@method getFormat
*/
});
getFormat = function(fmt) {
return this.formats[fmt];
};
JRSTheme.prototype.getFormat = function(fmt) {
return this.formats[fmt];
};
return JRSTheme;
})();
module.exports = JRSTheme;