New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-ember-hbs-template-compiler

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-ember-hbs-template-compiler - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

13

index.js
var path = require('path');
var Filter = require('broccoli-filter');
var Filter = require('broccoli-persistent-filter');
var jsStringEscape = require('js-string-escape');

@@ -9,8 +9,10 @@ var compiler = require('ember-template-compiler');

TemplateCompiler.prototype.constructor = TemplateCompiler;
function TemplateCompiler (inputTree, options) {
function TemplateCompiler (inputTree, _options) {
var options = _options || {};
options.persist = true;
if (!(this instanceof TemplateCompiler)) {
return new TemplateCompiler(inputTree, options);
}
this.inputTree = inputTree;
this.options = options || {};
Filter.call(this, inputTree, options);
this.options = options;
}

@@ -20,2 +22,5 @@

TemplateCompiler.prototype.targetExtension = 'js';
TemplateCompiler.prototype.baseDir = function() {
return __dirname;
};

@@ -22,0 +27,0 @@ TemplateCompiler.prototype.processString = function (string, relativePath) {

@@ -8,5 +8,6 @@ {

"description": "ember.js precompiler for projects that use broccoli",
"version": "1.6.2",
"version": "1.6.3",
"scripts": {
"test": "mocha test/**/*.spec.js --reporter tap"
"test": "mocha test/**/*.spec.js --reporter tap",
"test:color": "mocha test/**/*.spec.js"
},

@@ -28,9 +29,9 @@ "repository": {

"js-string-escape": "^1.0.0",
"broccoli-filter": "^0.1.6",
"broccoli-persistent-filter": "^1.1.1",
"ember-template-compiler": "1.6.1"
},
"devDependencies": {
"mocha": "^1.21.2"
"mocha": "^2.3.3"
},
"optionalDependencies": {}
}
var Ember = require('ember');
module.exports = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
module.exports = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data
/**/) {
this.compilerInfo = [4,'>= 1.0.0'];

@@ -4,0 +5,0 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};

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

Ember.TEMPLATES['foo'] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
Ember.TEMPLATES['foo'] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data
/**/) {
this.compilerInfo = [4,'>= 1.0.0'];

@@ -3,0 +4,0 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};

import Ember from 'ember';
export default Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
export default Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data
/**/) {
this.compilerInfo = [4,'>= 1.0.0'];

@@ -4,0 +5,0 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};

@@ -7,10 +7,11 @@ var fs = require('fs');

describe('broccoli-ember-hbs-template-compiler', function() {
it('it sets inputTree', function() {
var filter = new TemplateFilter('templates');
assert(filter.inputTree == 'templates');
});
function assertSameAsFileContent(string, expectedPath) {
var expected = fs.readFileSync(path.resolve(__dirname, expectedPath)).toString();
assert.equal(string, expected);
}
it('it sets options', function() {
var filter = new TemplateFilter('templates', {module: true});
assert(filter.options.module === true);
assert(filter.options.module);
});

@@ -21,4 +22,4 @@

var template = filter.processString('foo', './templates/foo.hbs');
var expected = fs.readFileSync(path.resolve(__dirname, 'expected-global.js')).toString();
assert(template === expected);
assertSameAsFileContent(template, 'expected-global.js');
});

@@ -29,4 +30,4 @@

var template = filter.processString('foo', './templates/foo.hbs');
var expected = fs.readFileSync(path.resolve(__dirname, 'expected-module.js')).toString();
assert(template === expected);
assertSameAsFileContent(template, 'expected-module.js');
});

@@ -37,5 +38,5 @@

var template = filter.processString('foo', './templates/foo.hbs');
var expected = fs.readFileSync(path.resolve(__dirname, 'expected-commonjs.js')).toString();
assert(template === expected);
assertSameAsFileContent(template, 'expected-commonjs.js');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc