【文件属性】:
文件名称:broccoli-nunjucks:预编译Nunjucks模板
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-26 08:14:44
JavaScript
西葫芦
预编译模板
输出的问题应在Nunjucks上报告。
安装
$ npm install --save-dev broccoli-nunjucks
用法
var nunjucks = require ( 'broccoli-nunjucks' ) ;
tree = nunjucks ( tree , options ) ;
原料药
nunjucks(树,[选项])
除了name以外,其他选项与相同。
options.name
类型: function 默认值:相对模板路径。 示例: templates/list.html
您可以通过提供一个获取相对路径并期望返回名称的函数来覆盖默认行为。
例子:
nunjucks ( tree , {
name : function ( relativePath ) {
return 'tpl-' + relativePath ;
【文件预览】:
broccoli-nunjucks-main
----.jshintrc(190B)
----.gitignore(13B)
----package.json(888B)
----Brocfile.js(57B)
----index.js(879B)
----test.js(292B)
----.github()
--------workflows()
----license(1KB)
----fixture()
--------fixture.html(20B)
----readme.md(983B)
----.gitattributes(12B)
----.editorconfig(223B)