mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-10 07:47:07 +01:00
Refactor generation.
Merge implicit and explicit generation paths, start emitting file transform & copy signals, fix various bugs, introduce new bugs, support better --debug outputs in the future.
This commit is contained in:
@ -22,12 +22,13 @@ UnderscoreGenerator = module.exports =
|
||||
generateSimple: ( data, tpl ) ->
|
||||
try
|
||||
# Compile and run the Handlebars template.
|
||||
tpl = _.template tpl
|
||||
template data
|
||||
t = _.template tpl
|
||||
t data
|
||||
catch
|
||||
#console.dir _error
|
||||
HMS = require '../core/status-codes'
|
||||
throw
|
||||
fluenterror: HMS[if tpl then 'invokeTemplate' else 'compileTemplate']
|
||||
fluenterror: HMS[if t then 'invokeTemplate' else 'compileTemplate']
|
||||
inner: _error
|
||||
|
||||
|
||||
@ -49,9 +50,9 @@ UnderscoreGenerator = module.exports =
|
||||
XML: require 'xml-escape'
|
||||
RAW: json
|
||||
cssInfo: cssInfo
|
||||
#engine: this
|
||||
#engine: @
|
||||
headFragment: opts.headFragment || ''
|
||||
opts: opts
|
||||
|
||||
registerHelpers theme, opts, cssInfo, ctx, this
|
||||
registerHelpers theme, opts, cssInfo, ctx, @
|
||||
@generateSimple ctx, jst
|
||||
|
Reference in New Issue
Block a user