andrewdavey / andrewdavey/cassette
JavascriptStringPipeline
- Ngôn ngữ chính
- C#
- Star
- 531
- Fork
- 139
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Like the hogan pipeline, it would be great if cassette could set the template as a javascript string to a variable.
``` csharp
bundles.Add(
"HtmlTemplates"
// Assign the Hogan processor to the HTML template bundles
bundle => bundle.Processor = new JavascriptStringPipeline() {
JavaScriptVariableName = "JST"
}
);
```
This would allow me to use any templating engine I want.
It would render like
``` js
var JST = JST|| {};
JST['message'] = 'hello: <%= name %>';
```
Then I can reference in my code.
``` js
var compiled = _.template(JST['message']);
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.