2.1.3 • Published 7 years ago
htmltemplate-transform v2.1.3
HTMLTemplate transformations
Pluggable transforms for HTML::Template.
Installation
npm install htmltemplate-transform
Usage
var path = require('path');
var transform = require('htmltemplate-transform');
// Plugin that inlines external template files into parent.
var include = require('htmltemplate-transform/plugins/include');
// Plugin that expands dot notation into a series of property accessors.
var jpath = require('htmltemplate-transform/plugins/jpath');
var templateFile = path.join(__dirname, 'template.tmpl');
var ast = transform(templateFile)
.using(
include({
includeTags: ['TMPL_INCLUDE'],
resolvePath: function(tagname, from, to) {
return path.resolve(path.dirname(from), to);
}
})
)
.using(jpath()) // Plugins can be chained.
.toAST();
console.log(ast);
2.1.3
7 years ago
2.0.3
8 years ago
2.0.2
8 years ago
2.0.1
8 years ago
2.0.0
8 years ago
1.0.11
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.0.2
9 years ago
0.0.1
9 years ago