vtp
v0.0.3
Published
vue template parser
Downloads
3
Readme
vtp
yet another vue template parser (compiler).
base on [email protected]
Usage
You can compiler vue template in your web browser, or use it as a node library even on the command-line using node.js
use vtp as a node library
$ [sudo] npm install vtp
var vtp = require(vtp);
var compiledResult = vtp(template);
compiledResult:{
"render":'', //渲染函数
"staticRenderFns":[] //静态渲染部分
}
use vtp as a command-line
$ [sudo] npm install vtp -g
vtp -c 01.tpl
These are the command-line flags for JS scripts
CLI Options:
'-c, --compile', 'just compile it'
'-d, --diff', 'get the difference from [email protected]'