ember-cli-htmlbars
Advanced tools
Comparing version 0.4.4 to 0.4.5
@@ -22,3 +22,3 @@ var Filter = require('broccoli-filter'); | ||
TemplateCompiler.prototype.constructor = TemplateCompiler; | ||
TemplateCompiler.prototype.extensions = ['hbs']; | ||
TemplateCompiler.prototype.extensions = ['hbs', 'handlebars']; | ||
TemplateCompiler.prototype.targetExtension = 'js'; | ||
@@ -25,0 +25,0 @@ TemplateCompiler.prototype.processString = function (string, relativePath) { |
{ | ||
"name": "ember-cli-htmlbars", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "A library for adding htmlbars to ember CLI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,2 +58,15 @@ 'use strict'; | ||
describe('handlebars', function() { | ||
it('compiles .handlebars file', function() { | ||
var tree = templateCompilerFilter(sourcePath); | ||
builder = new broccoli.Builder(tree); | ||
return builder.build().then(function(results) { | ||
var actual = fs.readFileSync(results.directory + '/non-standard-extension.js', { encoding: 'utf8'}); | ||
var source = fs.readFileSync(sourcePath + '/non-standard-extension.handlebars', { encoding: 'utf8' }); | ||
var expected = 'export default Ember.Handlebars.template(' + handlbarsTemplateCompiler.precompile(source, false) + ')'; | ||
assert.equal(actual,expected,'They dont match!') | ||
}); | ||
}); | ||
function assertOutput(results) { | ||
@@ -60,0 +73,0 @@ var actual = fs.readFileSync(results.directory + '/template.js', { encoding: 'utf8'}); |
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
12043
13
307