Nightly Panic Munchies

    browserify-jst

    0.0.3 • Public • Published

    browserify-jst

    A browserify transform for jst underscore templates! Yay!

    Installation:

    npm install browserify-jst

    Usage:

    Make a jst template like so:

    <!DOCTYPE html>
    <html>
    <head>
      <title><%=title%></title>
    </head>
    <body>
    <p>Hello there, <%=name%></p>
    </body>
    </html>

    Now require() the handlebar template file in code like so:

    var aTemplateFunction = require('./template.jst');
     
    var html = aTemplateFunction({title: "An instantiated template!", name: "David"});

    and run browserify with the transform option:

    browserify -t browserify-jst entry-point.js

    That's all!

    Implementation details

    This transform module packages the jst templates with the jst hich is smaller than the complete handlebars library. This is good, because it means smaller bundle files for you.

    Install

    npm i browserify-jst

    DownloadsWeekly Downloads

    1

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • zhoujianlin