grunt-contrib-handlebars
Advanced tools
Comparing version
{ | ||
"name": "grunt-contrib-handlebars", | ||
"description": "Precompile Handlebars templates to JST file.", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-handlebars", | ||
@@ -38,3 +38,3 @@ "author": { | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-internal": "~0.4.6", | ||
"grunt-contrib-internal": "~0.4.12", | ||
"grunt-jscs": "~1.0.0" | ||
@@ -41,0 +41,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-handlebars v0.9.2 [](https://travis-ci.org/gruntjs/grunt-contrib-handlebars) [](https://ci.appveyor.com/project/gruntjs/grunt-contrib-handlebars/branch/master) | ||
# grunt-contrib-handlebars v0.9.3 [](https://travis-ci.org/gruntjs/grunt-contrib-handlebars) [](https://ci.appveyor.com/project/gruntjs/grunt-contrib-handlebars/branch/master) | ||
@@ -249,2 +249,4 @@ > Precompile Handlebars templates to JST file. | ||
* 2014-12-31 v0.9.3 Fix issues with namespace declarations and partialsUseNamespace. | ||
* 2014-12-31 v0.9.2 More fixes for AMD namespacing. | ||
* 2014-11-09 v0.9.1 Fixes namespacing issues. | ||
@@ -283,2 +285,2 @@ * 2014-10-16 v0.9.0 Update to Handlebars 2.0. | ||
*This file was generated on Wed Dec 31 2014 13:00:37.* | ||
*This file was generated on Wed Feb 04 2015 21:54:44.* |
@@ -5,3 +5,3 @@ /* | ||
* | ||
* Copyright (c) 2014 Tim Branyen, contributors | ||
* Copyright (c) 2015 Tim Branyen, contributors | ||
* Licensed under the MIT license. | ||
@@ -89,2 +89,3 @@ */ | ||
this.files.forEach(function(f) { | ||
var declarations = []; | ||
var partials = []; | ||
@@ -146,4 +147,5 @@ var templates = []; | ||
nsInfo = getNamespaceInfo(filepath); | ||
partials.push(nsInfo.declaration); | ||
if (nsInfo.declaration) { | ||
declarations.push(nsInfo.declaration); | ||
} | ||
partials.push('Handlebars.registerPartial(' + JSON.stringify(filename) + ', ' + nsInfo.namespace + | ||
@@ -155,4 +157,2 @@ '[' + JSON.stringify(filename) + '] = ' + compiled + ');'); | ||
} else { | ||
nsInfo = getNamespaceInfo(filepath); | ||
if (options.amd && !useNamespace) { | ||
@@ -163,3 +163,6 @@ compiled = 'return ' + compiled; | ||
if (useNamespace) { | ||
templates.push(nsInfo.declaration); | ||
nsInfo = getNamespaceInfo(filepath); | ||
if (nsInfo.declaration) { | ||
declarations.push(nsInfo.declaration); | ||
} | ||
templates.push(nsInfo.namespace + '[' + JSON.stringify(filename) + '] = ' + compiled + ';'); | ||
@@ -174,3 +177,3 @@ } else if (options.commonjs === true) { | ||
var output = partials.concat(templates); | ||
var output = declarations.concat(partials, templates); | ||
if (output.length < 1) { | ||
@@ -177,0 +180,0 @@ grunt.log.warn('Destination not written because compiled files were empty.'); |
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
22065
1.54%203
2.53%285
0.71%1
Infinity%