Skip to content

JavascriptStringPipeline #265

@prabirshrestha

Description

@prabirshrestha

Like the hogan pipeline, it would be great if cassette could set the template as a javascript string to a variable.

bundles.Add<HtmlTemplate>(
    "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

var JST = JST|| {};
JST['message'] = 'hello: <%= name %>';

Then I can reference in my code.

var compiled = _.template(JST['message']);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions