Comparing version 2.2.0 to 2.2.1
@@ -62,3 +62,9 @@ /*jshint node: true*/ | ||
function() { | ||
var js = precompiler.precompile(buffer, opts && opts.precompilerOptions); | ||
var js; | ||
try { | ||
js = precompiler.precompile(buffer, opts && opts.precompilerOptions); | ||
} catch (e) { | ||
this.emit('error', e); | ||
return this.queue(null); | ||
} | ||
// Compile only with the runtime dependency. | ||
@@ -65,0 +71,0 @@ var compiled = "// hbsfy compiled Handlebars template\n"; |
{ | ||
"name": "hbsfy", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Handlebars precompiler plugin for Browserify v2", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -66,3 +66,3 @@ [![Build Status](https://travis-ci.org/epeli/node-hbsfy.png?branch=master)](https://travis-ci.org/epeli/node-hbsfy) | ||
browserify --precompilerOptions [ --knownHelpersOnly --knownHelpers [ --myUltimateHelper ] ] main.js > bundle.js | ||
browserify -t [ hbsfy --precompilerOptions [ --knownHelpersOnly --knownHelpers [ --myUltimateHelper ] ] ] main.js > bundle.js | ||
@@ -80,11 +80,15 @@ See [Handlebars API reference](http://handlebarsjs.com/reference.html) for | ||
"transform": [ | ||
["hbsfy", { | ||
"extensions": ["html"] | ||
"precompilerOptions": { | ||
"knownHelpersOnly": true, | ||
"knownHelpers": { | ||
"myUltimateHelper": true | ||
[ | ||
"hbsfy", | ||
{ | ||
"extensions": [ | ||
"html" | ||
], | ||
"precompilerOptions": { | ||
"knownHelpersOnly": true, | ||
"knownHelpers": { | ||
"myUltimateHelper": true | ||
} | ||
} | ||
} | ||
} | ||
] | ||
@@ -145,2 +149,6 @@ ] | ||
### 2.2.1 | ||
- Emit compile errors instead of crashing. [#38](https://github.com/epeli/node-hbsfy/pull/38) | ||
### 2.2.0 | ||
@@ -147,0 +155,0 @@ |
Sorry, the diff of this file is not supported yet
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
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
29546
2530
29
604
0
187
11