Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 783 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 783 Bytes

vtp

npm

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]'