1.1.1 • Published 9 years ago

themeleon-mustache v1.1.1

Weekly downloads
6
License
Unlicense
Repository
github
Last release
9 years ago

Themeleon Mustache

Mustache mixin for Themeleon.

Warning: this repository/package is deprecated, template engines will be handled by consolidate.js in Themeleon 3.0.

Installation

In your package.json:

{
  "dependencies": {
    "themeleon": "1.*",
    "themeleon-mustache": "1.*"
  }
}

Usage

Say we have the following theme structure:

views/
  foo/
    bar.mustache
  foo.mustache
  index.mustache
var themeleon = require('themeleon')();

// Use the Mustache mixin
themeleon.use('mustache');

// Or inject your own instance
themeleon.use('mustache', require('mustache'));

module.exports = themeleon(__dirname, function (t) {
  // Render index alone
  t.mustache('views/index.mustache', 'index.html');

  // Or include a partials object
  t.mustache('views/index.mustache', 'index.html', {
    foo: 'views/foo.mustache',
    'foo/bar': 'views/foo/bar.mustache',
  });

  // Or let the mixin resolve all `.mustache` files in `views`
  // Note: `.mustache` and `.mst` extensions are supported.
  t.mustache('views/index.mustache', 'index.html', 'views');
});
1.1.1

9 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago