Socket
Book a DemoInstallSign in
Socket

grunt-contrib-handlebars

Package Overview
Dependencies
Maintainers
8
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-handlebars - npm Package Compare versions

Comparing version

to
0.11.0

14

package.json
{
"name": "grunt-contrib-handlebars",
"description": "Precompile Handlebars templates to JST file.",
"version": "0.10.2",
"version": "0.11.0",
"author": {

@@ -10,8 +10,3 @@ "name": "Grunt Team",

"repository": "gruntjs/grunt-contrib-handlebars",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/gruntjs/grunt-contrib-handlebars/blob/master/LICENSE-MIT"
}
],
"license": "MIT",
"engines": {

@@ -24,3 +19,3 @@ "node": ">=0.10.0"

"dependencies": {
"handlebars": "^3.0.0",
"handlebars": "~4.0.0",
"chalk": "^1.0.0",

@@ -30,2 +25,3 @@ "nsdeclare": "0.1.0"

"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",

@@ -36,3 +32,3 @@ "grunt-contrib-clean": "^0.6.0",

"grunt-contrib-nodeunit": "^0.4.1",
"grunt-jscs": "^1.5.0"
"grunt-jscs": "^2.1.0"
},

@@ -39,0 +35,0 @@ "peerDependencies": {

@@ -1,2 +0,2 @@

# grunt-contrib-handlebars v0.10.2 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-handlebars.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-handlebars) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/byxsu7xtyjxuwe3g/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-handlebars/branch/master)
# grunt-contrib-handlebars v0.11.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-handlebars.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-handlebars) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/byxsu7xtyjxuwe3g/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-handlebars/branch/master)

@@ -45,3 +45,3 @@ > Precompile Handlebars templates to JST file.

Example:
```js
```javascript
options: {

@@ -55,3 +55,3 @@ namespace: 'MyApp.Templates'

Example:
```js
```javascript
options: {

@@ -100,3 +100,3 @@ namespace: function(filename) {

```js
```javascript
define(['handlebars'], function(Handlebars) {

@@ -114,3 +114,3 @@ //...//

```js
```javascript
module.exports = function(Handlebars) {

@@ -125,3 +125,3 @@ //...//

```js
```javascript
var Handlebars = require('handlebars');

@@ -136,3 +136,3 @@ var templates = require('./templates')(Handlebars);

```js
```javascript
options: {

@@ -152,3 +152,3 @@ processContent: function(content, filepath) {

```js
```javascript
options: {

@@ -171,3 +171,3 @@ processAST: function(ast) {

```js
```javascript
options: {

@@ -185,3 +185,3 @@ processName: function(filePath) {

```js
```javascript
options: {

@@ -203,3 +203,3 @@ processPartialName: function(filePath) { // input: templates/_header.hbs

``` javascript
```javascript
// assumes partial files would be prefixed with "par_" ie: "par_header.hbs"

@@ -217,3 +217,3 @@ options: {

``` javascript
```javascript
options: {

@@ -231,3 +231,3 @@ partialRegex: /.*/,

``` javascript
```javascript
options: {

@@ -246,3 +246,3 @@ compilerOptions: {

```js
```javascript
handlebars: {

@@ -264,2 +264,3 @@ compile: {

* 2015-10-16   v0.11.0   Handlebars ~4
* 2015-04-21   v0.10.2   Added options.amd as a function

@@ -303,2 +304,2 @@ * 2015-03-23   v0.10.1   Documentation fix

*This file was generated on Tue Apr 21 2015 09:47:19.*
*This file was generated on Fri Oct 16 2015 11:17:16.*

@@ -50,8 +50,7 @@ /*

return declarations[0];
} else {
// we only need to take any declaration to extract the global namespace.
// Another option might be find the shortest declaration which is the global one.
var matches = declarations[0].match(/(this\[[^\[]+\])/g);
return matches[0];
}
// We only need to take any declaration to extract the global namespace.
// Another option might be find the shortest declaration which is the global one.
var matches = declarations[0].match(/(this\[[^\[]+\])/g);
return matches[0];
};

@@ -105,8 +104,9 @@

var getNamespaceInfo = _.memoize(function(filepath) {
if (!useNamespace) {return undefined;}
if (!useNamespace) {
return undefined;
}
if (_.isFunction(options.namespace)) {
return nsdeclare(options.namespace(filepath), nsDeclareOptions);
} else {
return nsdeclare(options.namespace, nsDeclareOptions);
}
return nsdeclare(options.namespace, nsDeclareOptions);
});

@@ -120,5 +120,4 @@

return false;
} else {
return true;
}
return true;
})

@@ -199,3 +198,3 @@ .forEach(function(filepath) {

} else if (typeof options.amd === 'function') {
output.unshift("define(['" + options.amd(filename, ast, compiled) + "'], function(Handlebars) {");
output.unshift('define([\'' + options.amd(filename, ast, compiled) + '\'], function(Handlebars) {');
} else if (Array.isArray(options.amd)) {

@@ -202,0 +201,0 @@ // convert options.amd to a string of dependencies for require([...])

Sorry, the diff of this file is not supported yet