bogart-handlebars
Advanced tools
Comparing version 0.9.4 to 0.10.1
var _ = require('underscore'); | ||
var Handlebars = require('handlebars'); | ||
require('handlebars-layouts')(Handlebars); | ||
var layouts = require('handlebars-layouts'); | ||
@@ -16,2 +16,15 @@ var handlebarsLoadTree = require('handlebars-load-tree'); | ||
layouts.register(Handlebars); | ||
// Add convence helpers for content calls | ||
Handlebars.registerHelper('replace', function(name, options) { | ||
return Handlebars.helpers['content'].call(this, name, _.extend(options, { hash: { mode: 'replace' } } )); | ||
}); | ||
Handlebars.registerHelper('append', function(name, options) { | ||
return Handlebars.helpers['content'].call(this, name, _.extend(options, { hash: { mode: 'append' } } )); | ||
}); | ||
Handlebars.registerHelper('prepend', function(name, options) { | ||
return Handlebars.helpers['content'].call(this, name, _.extend(options, { hash: { mode: 'prepend' } } )); | ||
}); | ||
options = _.defaults(options || {}, { | ||
@@ -43,2 +56,3 @@ watch: 1000 | ||
// | ||
var body = view(locals); | ||
@@ -45,0 +59,0 @@ |
{ | ||
"name": "bogart-handlebars", | ||
"version": "0.9.4", | ||
"version": "0.10.1", | ||
"description": "Handlebars tools for Bogart", | ||
@@ -19,5 +19,5 @@ "main": "index.js", | ||
"handlebars": "^4.0.5", | ||
"handlebars-layouts": "~0.2.0", | ||
"handlebars-load-tree": "^0.9.0" | ||
"handlebars-layouts": "=3.1.3", | ||
"handlebars-load-tree": "=0.10.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5029
63
- Removedbluebird@1.1.1(transitive)
- Removedhandlebars-layouts@0.2.0(transitive)
- Removedhandlebars-load-tree@0.9.0(transitive)
- Removedwalkdir@0.0.7(transitive)
Updatedhandlebars-layouts@=3.1.3
Updatedhandlebars-load-tree@=0.10.0