3.1.4 • Published 6 months ago
fis-parser-template v3.1.4
fis-parser-template
template.js的fis编译插件。
安装
$ npm install --save @templatejs/runtime # 安装template运行时
# $ npm install --save template_js # 也可以安装template
$ npm install -g fis-parser-template
配置
配置参数同template.js参数一样,其中global参数代表template.js的全局名称。
fis2
//设置编译器
fis.config.merge({
modules: {
parser: {
tmpl: 'template' // tmpl后缀的使用fis-parser-template处理
}
}
});
//自定义参数
fis.config.merge({
settings: {
parser: {
template: {
sTag: '<%',
eTag: '%>',
global: 'template',
sandbox: false, // 沙箱模式
}
}
}
});
fis3
fis.match('**.tmpl', {
parser: fis.plugin('template', {
sTag: '<%',
eTag: '%>',
global: 'template',
sandbox: false, // 沙箱模式
}),
isJsLike: true,
release : false
});
js中如何使用
const template = require('@templatejs/runtime');
const tpl = __inline('xxx.tmpl');
const html = tpl({ /* data */ });
贡献者列表
:gear: 更新日志
:airplane: 计划列表
谁在使用
相关链接
3.0.0-alpha.0
6 months ago
3.1.2-alpha.0
6 months ago
3.1.4
6 months ago
3.1.3-alpha.0
6 months ago
3.1.0-alpha.0
6 months ago
2.4.2
4 years ago
2.4.1
4 years ago
2.4.0
4 years ago
2.3.0
4 years ago
2.2.1
4 years ago
2.2.0
4 years ago
2.1.0
4 years ago
2.0.2
5 years ago
2.0.2-alpha.0
5 years ago
0.3.3
8 years ago
0.3.2
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.0
8 years ago
0.1.1
9 years ago
0.1.0-2
9 years ago
0.1.0-1
9 years ago
0.1.0
9 years ago