browserify-hogan
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -7,3 +7,8 @@ var hogan = require('hogan.js'), | ||
var wrap = function (template) { | ||
return 'module.exports = new (require(\'hogan.js/lib/template\').Template)(' + template + ');' | ||
return ( | ||
'var template = new (require(\'hogan.js/lib/template\')).Template(' + template + ');' + | ||
'module.exports = {' + | ||
' render: function () { return template.render.apply(template, arguments); }' + | ||
'};' | ||
); | ||
} | ||
@@ -10,0 +15,0 @@ |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": { |
@@ -7,3 +7,3 @@ # browserify-hogan [![Build Status](https://secure.travis-ci.org/unfold/browserify-hogan.png?branch=master)](http://travis-ci.org/unfold/browserify-hogan) | ||
Give your template an extension of `.ms`, `.mustach`, `.hogan`, `.hg`, or `.html`. | ||
Give your template an extension of `.ms`, `.mustache`, `.hogan`, `.hg`, or `.html`. | ||
@@ -10,0 +10,0 @@ In module `foo.js` require your template: |
@@ -1,2 +0,2 @@ | ||
var template = require('./template.ms'); | ||
console.log(template.render({name: 'Dave'})); | ||
var render = require('./template.ms').render; | ||
console.log(render({name: 'Dave'})); |
@@ -10,5 +10,9 @@ var exec = require('child_process').exec, | ||
console.log('Testing with command:', command); | ||
exec(command, function (err, stdout, stderr) { | ||
assert(!err && !stderr, 'No errors in Browserify or when executing bundle'); | ||
assert.strictEqual(stdout.trim(), 'Hello Dave!', 'Template renders correctly'); | ||
console.log('Test complete.'); | ||
}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4018
38
1