mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-03 04:47:07 +01:00
Merge pull request #191 from ryneeverett/theme-helpers
Register handlebars helpers in themes. Fix #158.
This commit is contained in:
@ -115,8 +115,12 @@ _load = (formatsHash) ->
|
||||
# Found a CSS file without an HTML file in a theme that inherits
|
||||
# from another theme. This is the override CSS file.
|
||||
that.overrides = { file: cssf.path, data: cssf.data }
|
||||
formatsHash
|
||||
|
||||
# Now, save all the javascript file paths to a theme property.
|
||||
jsFiles = fmts.filter (fmt) -> fmt and (fmt.ext == 'js')
|
||||
@.jsFiles = jsFiles.map (jsf) -> jsf['path']
|
||||
|
||||
formatsHash
|
||||
|
||||
|
||||
### Load a single theme file. ###
|
||||
|
@ -30,7 +30,9 @@ module.exports = ( theme, opts ) ->
|
||||
func.apply @, args
|
||||
hVal
|
||||
, @
|
||||
|
||||
|
||||
HANDLEBARS.registerHelper wrappedHelpers
|
||||
HANDLEBARS.registerHelper blockHelpers
|
||||
for themeHelpers in theme.jsFiles
|
||||
HANDLEBARS.registerHelper require themeHelpers
|
||||
return
|
||||
|
Reference in New Issue
Block a user