apeman-commons-templating
apeman common module for templating.
Last updated 5 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-commons-templating 
SYNC missed versions from official npm registry.

apeman-commons-templating

Build Status Code Climate Code Coverage npm version

apeman common module for templating.

Installation

Install module via npm.

# Install as local module.
$ npm install apeman-commons-templating --save

Usage

Create bud renderable.

Create bud renderable object.

var templating = require('apeman-commons-templating');

var renderer = templating.budRenderer({
    'public/{{username}}.txt': {
        force: true,
        mkdirp: true,
        mode: 466,
        tmpl: "Hi, my name is {{username}}"
    }
});
renderer.render({
    username: "John"
}, function () {
    /*...*/
});

Resolve template.

Resolve a template file path.

var templating = require('apeman-commons-templating');


var resolver = templating.tmplResolver('src/templates');

var filename = resolver('hbs/foo.txt.hbs');

License

This software is released under the MIT License.

Links

Current Tags

  • 1.2.3                                ...           latest (5 years ago)

9 Versions

  • 1.2.3                                ...           5 years ago
  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)

Copyright 2014 - 2016 © taobao.org |