Socket
Socket
Sign inDemoInstall

hogan-middleware

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.1.0

5

package.json
{
"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": "*"
}
}

11

src/template-engine.js

@@ -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;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc