andrewdavey / andrewdavey/cassette

JavascriptStringPipeline

Đang mở
#265 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Feature Request
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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.