1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-05 09:51:04 +01:00
This commit is contained in:
hacksalot
2016-02-11 11:48:44 -05:00
parent aaa5e1fc1f
commit 317a250917
7 changed files with 203 additions and 297 deletions

View File

@ -64,7 +64,7 @@ module.exports = class TemplateGenerator extends BaseGenerator
# Run the transformation!
results = curFmt.files.map ( tplInfo, idx ) ->
if tplInfo.action == 'transform'
trx = @transform rez, tplInfo.data, this.format, opts, opts.themeObj, curFmt
trx = @transform rez, tplInfo.data, @format, opts, opts.themeObj, curFmt
if tplInfo.ext == 'css'
curFmt.files[idx].data = trx
else tplInfo.ext == 'html'
@ -109,20 +109,17 @@ module.exports = class TemplateGenerator extends BaseGenerator
if file.info.action != 'copy' and @onBeforeSave
file.data = this.onBeforeSave
theme: opts.themeObj
outputFile: thisFilePath #if file.info.major then f else thisFilePath
outputFile: thisFilePath
mk: file.data
opts: this.opts
if !file.data
return # PDF etc
return
# Write the file
opts.beforeWrite? thisFilePath
MKDIRP.sync PATH.dirname( thisFilePath )
#console.log( Object.keys(file.info) )
console.log file.info.path
if file.info.action != 'copy'
FS.writeFileSync thisFilePath, file.data, encoding: 'utf8', flags: 'w'
else