broccoli-template-builder
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -0,18 +1,15 @@ | ||
var compiler = require('ember-template-compiler'); | ||
var broccoliTemplateBuilder = require('./index'); | ||
module.exports = function (broccoli) { | ||
var compiler = require('ember-template-compiler'); | ||
var broccoliTemplateBuilder = require('./index'); | ||
var templates = 'test/templates'; | ||
var templates = broccoli.makeTree('test/templates'); | ||
templates = broccoliTemplateBuilder(templates, { | ||
extensions: ['hbs'] | ||
, namespace: 'Ember.TEMPLATES' | ||
, outputFile: 'assets/templates.js' | ||
, compile: function (string) { | ||
return 'Ember.Handlebars.template('+compiler.precompile(string)+')'; | ||
} | ||
}); | ||
templates = broccoliTemplateBuilder(templates, { | ||
extensions: ['hbs'] | ||
, namespace: 'Ember.TEMPLATES' | ||
, outputFile: 'assets/templates.js' | ||
, compile: function (string) { | ||
return 'Ember.Handlebars.template('+compiler.precompile(string)+')'; | ||
} | ||
}); | ||
return templates; | ||
}; | ||
module.exports = templates; |
@@ -7,2 +7,3 @@ var Transform = require('broccoli-transform'); | ||
var path = require('path'); | ||
var jsStringEscape = require('js-string-escape'); | ||
@@ -60,2 +61,3 @@ DEFAULTS = { | ||
var name = buildName(path); | ||
string = jsStringEscape(string); | ||
string = compile(string); | ||
@@ -62,0 +64,0 @@ string = namespace(name, string); |
{ | ||
"name": "broccoli-template-builder", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"repository": { | ||
@@ -15,2 +15,3 @@ "type": "git", | ||
"broccoli-transform": "^0.1.1", | ||
"js-string-escape": "^1.0.0", | ||
"mkdirp": "^0.5.0", | ||
@@ -25,2 +26,3 @@ "rsvp": "^3.0.6", | ||
"ember-template-compiler": "~1.5.0-beta.4", | ||
"fake-fs": "^0.3.0", | ||
"handlebars": "~1.3.0", | ||
@@ -27,0 +29,0 @@ "mocha": "~1.18.2", |
@@ -0,3 +1,12 @@ | ||
## Broccoli Template Builder | ||
[![Build Status](https://travis-ci.org/moudy/broccoli-template-builder.svg)](https://travis-ci.org/moudy/broccoli-template-builder) | ||
A flexible Broccoli transform plugin for client-side templates. | ||
### Install | ||
``` | ||
npm install --save broccoli-template-builder | ||
``` | ||
### Example | ||
``` js | ||
@@ -4,0 +13,0 @@ module.exports = function (broccoli) { |
@@ -10,3 +10,3 @@ var fs = require('fs'); | ||
var url = 'http://localhost:'+PORT+path; | ||
http.createServer(app).listen(PORT); | ||
var server = http.createServer(app).listen(PORT); | ||
@@ -50,2 +50,4 @@ describe('broccoli-template-compiler', function () { | ||
after(function () {server.close();}); | ||
}); |
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
6424
12
128
31
5
8
+ Addedjs-string-escape@^1.0.0
+ Addedjs-string-escape@1.0.1(transitive)