mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-10 07:47:07 +01:00
Add baseline support for multifile themes. #rough
This commit is contained in:
@ -25,8 +25,8 @@ HTML resume generator for FluentCV.
|
||||
, outFolder = PATH.parse( info.outputFile ).dir, that = this;
|
||||
|
||||
info.theme.cssFiles.forEach( function( f ) {
|
||||
var fi = PATH.parse( f[1].path );
|
||||
FS.copySync( f[1].path, PATH.join( outFolder, fi.base ), { clobber: true }, function( e ) {
|
||||
var fi = PATH.parse( f.path );
|
||||
FS.copySync( f.path, PATH.join( outFolder, fi.base ), { clobber: true }, function( e ) {
|
||||
throw { fluenterror: that.codes.copyCss, data: [cssSrc,cssDst] };
|
||||
});
|
||||
});
|
||||
|
@ -96,12 +96,16 @@ Template-based resume generator base for FluentCV.
|
||||
// Load theme and CSS data
|
||||
var tplFolder = PATH.join( tFolder, 'src' );
|
||||
var curFmt = theme.getFormat( this.format );
|
||||
var cssInfo = { file: curFmt.css ? curFmt.cssPath : null, data: curFmt.css || null };
|
||||
|
||||
// Compile and invoke the template!
|
||||
var mk = this.single( rez, curFmt.data, this.format, cssInfo, this.opts );
|
||||
this.onBeforeSave && (mk = this.onBeforeSave( { mk: mk, theme: theme, outputFile: f } ));
|
||||
FS.writeFileSync( f, mk, { encoding: 'utf8', flags: 'w' } );
|
||||
var that = this;
|
||||
curFmt.files.forEach(function(tplInfo){
|
||||
|
||||
var cssInfo = { file: tplInfo.css ? tplInfo.cssPath : null, data: tplInfo.css || null };
|
||||
// Compile and invoke the template!
|
||||
var mk = that.single( rez, tplInfo.data, that.format, cssInfo, that.opts );
|
||||
that.onBeforeSave && (mk = that.onBeforeSave( { mk: mk, theme: theme, outputFile: f } ));
|
||||
FS.writeFileSync( f, mk, { encoding: 'utf8', flags: 'w' } );
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user