node package manager


Build Status


Load can-stache templates with StealJS


This package will configure Steal so that you can import templates. Start by installing with NPM.

npm install steal-stache --save

Next, let Steal know that it needs to load the plugin using the steal property in the project's package.json.

    "steal": {
        "plugins": [

And then assuming you are using NPM with Steal like:

<script src="node_modules/steal/steal.js"></script>

All you have to do is import the template:

import template from "./main.stache";


steal-stache Object

A StealJS extension that allows stache templates as dependencies.


Import a [can-stache stache] module in your code and use it to render.

var template = require("./main.stache");
var Map = require("can-map");
var map = new Map();
var frag = template(map);
// frag is a live-bound DocumentFragment 
  1. STACHE_MODULE_NAME {moduleName}: The module name of a stache template. This will typically be something like templates/main.stache.
  • returns {can-stache.renderer}: A renderer function that will render the template into a document fragment.


Making a Build

To make a build of the distributables into dist/ in the cloned repository run

npm install
node build

Running the tests

Tests can run in the browser by opening a webserver and visiting the test.html page. Automated tests that run the tests from the command line in Firefox can be run with

npm test