0.0.1 • Published 7 years ago
think-template-dustjs v0.0.1
think-template-dustjs
Install
npm install think-template-dustjs
How to use
register adapter
import DustjsAdapter from 'think-template-dustjs';
think.adapter('template', 'dustjs', DustjsAdapter);
add above code in bootstrap file, like src/common/bootstrap/adapter.js
.
change view type
change view type in file src/common/config/view.js
:
export default {
type: 'dustjs',
adapter: {
dustjs: { //dustjs options
//set prerender function if you want extend your dust template
prerender(options, dust, templateFile) {
},
cache: false,
whitespace: false
}
}
LICENSE
MIT
0.0.1
7 years ago