babel-plugin-htmlbars-inline-precompile
Advanced tools
Comparing version 0.0.1 to 0.0.2
10
index.js
@@ -18,3 +18,11 @@ module.exports = function(precompile) { | ||
this.remove(); | ||
// Prefer calling dangerouslyRemove instead of remove (if present) to | ||
// suppress a deprecation warning. | ||
// | ||
// TODO: delete the fallback once we only support babel >= 5.5.0. | ||
if (typeof this.dangerouslyRemove === 'function') { | ||
this.dangerouslyRemove(); | ||
} else { | ||
this.remove(); | ||
} | ||
} | ||
@@ -21,0 +29,0 @@ }, |
{ | ||
"name": "babel-plugin-htmlbars-inline-precompile", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Babel plugin to replace tagged template strings with precompiled HTMLBars templates", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -57,10 +57,6 @@ var assert = require('assert'); | ||
it("warns when the tagged template string contains placeholders", function() { | ||
try { | ||
assert.throws(function() { | ||
transform("import hbs from 'htmlbars-inline-precompile'; var compiled = hbs`string ${value}`"); | ||
assert.fail("error should have been thrown"); | ||
} catch (e) { | ||
assert.ok(e.message.match(/placeholders inside a tagged template string are not supported/)); | ||
} | ||
}, /placeholders inside a tagged template string are not supported/); | ||
}); | ||
}); |
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
6559
7
87