hogan-middleware
Advanced tools
Comparing version 0.0.3 to 0.1.0
{ | ||
"name": "hogan-middleware", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "Middleware component to use Hogan.js mustache templates as views in an Express server", | ||
@@ -13,4 +13,5 @@ "author": "Steve King <steve@mydev.co>", | ||
"hogan.js":"", | ||
"readdir":"*" | ||
"readdir":"*", | ||
"debug": "*" | ||
} | ||
} |
@@ -6,2 +6,3 @@ | ||
var FS = require('fs'); | ||
var debug = require('debug')('hogan'); | ||
@@ -71,3 +72,3 @@ function TemplateEngine(settings) { | ||
console.log('Stored template', templateName); | ||
debug('Stored template %s', templateName); | ||
}; | ||
@@ -95,3 +96,3 @@ | ||
TemplateEngine._refreshWatches = function(templatesPath) { | ||
console.log('Refreshing watched directories'); | ||
debug('Refreshing watched directories'); | ||
@@ -105,3 +106,3 @@ // Remove any existing watches | ||
.forEach(function (path) { | ||
console.log(' [WATCH] ', path); | ||
debug(' [WATCH] %s', path); | ||
TemplateEngine._watches.push( | ||
@@ -120,3 +121,3 @@ FS.watch(path, {persistent:false}, TemplateEngine._refreshTemplates.bind(TemplateEngine, templatesPath)) | ||
TemplateEngine._refreshTemplates = function(templatesPath) { | ||
console.log('Refreshing templates for', templatesPath); | ||
debug('Refreshing templates for %s', templatesPath); | ||
@@ -128,5 +129,5 @@ TemplateEngine._refreshWatches(templatesPath); | ||
.forEach(TemplateEngine._storeTemplate, TemplateEngine); | ||
console.log('Refreshing templates complete'); | ||
debug('Refreshing templates complete'); | ||
}; | ||
module.exports = TemplateEngine; |
Floating dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
6986
111
3
3
+ Addeddebug@*