mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 16:30:11 +00:00
Move freebie formats out of theme class.
This commit is contained in:
parent
5e51beddf7
commit
ccadb0416f
@ -67,10 +67,6 @@ Definition of the FRESHTheme class.
|
|||||||
formatsHash = loadImplicit.call( this );
|
formatsHash = loadImplicit.call( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add freebie formats every theme gets
|
|
||||||
formatsHash.json = { title: 'json', outFormat: 'json', pre: 'json', ext: 'json', path: null, data: null };
|
|
||||||
formatsHash.yml = { title: 'yaml', outFormat: 'yml', pre: 'yml', ext: 'yml', path: null, data: null };
|
|
||||||
|
|
||||||
// Cache
|
// Cache
|
||||||
this.formats = formatsHash;
|
this.formats = formatsHash;
|
||||||
|
|
||||||
|
@ -218,9 +218,25 @@ Implementation of the 'generate' verb for HackMyResume.
|
|||||||
Load the specified theme.
|
Load the specified theme.
|
||||||
*/
|
*/
|
||||||
function load_theme( tFolder ) {
|
function load_theme( tFolder ) {
|
||||||
|
|
||||||
|
// Create a FRESH or JRS theme object
|
||||||
var theTheme = _opts.theme.indexOf('jsonresume-theme-') > -1 ?
|
var theTheme = _opts.theme.indexOf('jsonresume-theme-') > -1 ?
|
||||||
new JRSTheme().open(tFolder) : new FluentTheme().open( tFolder );
|
new JRSTheme().open(tFolder) : new FluentTheme().open( tFolder );
|
||||||
|
|
||||||
|
// Add freebie formats every theme gets
|
||||||
|
theTheme.formats.json = theTheme.formats.json || {
|
||||||
|
title: 'json', outFormat: 'json', pre: 'json',
|
||||||
|
ext: 'json', path: null, data: null
|
||||||
|
};
|
||||||
|
theTheme.formats.yml = theTheme.formats.yml || {
|
||||||
|
title: 'yaml', outFormat: 'yml', pre: 'yml',
|
||||||
|
ext: 'yml', path: null, data: null
|
||||||
|
};
|
||||||
|
|
||||||
|
// Cache the theme object
|
||||||
_opts.themeObj = theTheme;
|
_opts.themeObj = theTheme;
|
||||||
|
|
||||||
|
// Output a message TODO: core should not log
|
||||||
var numFormats = Object.keys(theTheme.formats).length;
|
var numFormats = Object.keys(theTheme.formats).length;
|
||||||
_log( 'Applying '.info + theTheme.name.toUpperCase().infoBold +
|
_log( 'Applying '.info + theTheme.name.toUpperCase().infoBold +
|
||||||
(' theme (' + numFormats + ' formats)').info);
|
(' theme (' + numFormats + ' formats)').info);
|
||||||
|
Loading…
Reference in New Issue
Block a user