requirejs-tpl

0.4.1 • Public • Published

Template plugin for RequireJs

NPM version Build Status Coverage Status Dependency Status

Notice! this plugin requires the standard text plugin.

This plugin will allow you to require templates, as employed in KnockoutJS, via the ordinary dependency syntax.

Example:

define([
    'tpl!templates/thing.ko'
], function () {
    [... code ...]
});

The above will fetch the thing.ko file, and insert it into the DOM in a script tag with the id thing.

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i requirejs-tpl

    Weekly Downloads

    54

    Version

    0.4.1

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • maartenwinter
    • papandreou