├── .gitignore ├── test ├── output │ ├── function.html │ ├── vHtml.html │ ├── voidElements.html │ ├── slot.html │ ├── component_dynamic.html │ ├── parallel.html │ ├── class.html │ ├── component_fragment.html │ ├── directive.html │ ├── main.html │ ├── style.html │ └── component.html ├── api_test.go ├── parallel_test.go ├── dev │ └── map_mem_test.go ├── class_test.go ├── style_test.go ├── parallel_comp_test.go ├── slot_test.go ├── func_test.go ├── directive_test.go ├── base_test.go └── component_test.go ├── internal ├── lib │ ├── parse │ │ ├── readme.md │ │ └── html │ │ │ ├── util_test.go │ │ │ ├── hash.go │ │ │ ├── README.md │ │ │ ├── util.go │ │ │ ├── lex_test.go │ │ │ └── lex.go │ └── log │ │ └── log.go ├── parser │ ├── parsevue_output.txt │ ├── parsevue_test.go │ ├── parsehtml_output.txt │ ├── parsehtml_test.go │ ├── parsehtml.go │ └── parsevue.go └── util │ └── util.go ├── util_test.go ├── bench ├── jetviews │ └── bench.jet ├── struct.go ├── bench.qtpl ├── quicktemplate.qtpl.go └── timing_test.go ├── statement.txt ├── go.mod ├── doc ├── internal.md ├── api.md └── syntax.md ├── LICENSE ├── example └── hello │ └── main.go ├── statement_test.go ├── jsexpression_test.go ├── go.sum ├── README.md ├── util.go ├── vpl.go ├── jsexpression.go └── statement.go /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | -------------------------------------------------------------------------------- /test/output/function.html: -------------------------------------------------------------------------------- 1 | appendName: z|bysir | fullName: z|bysir | getVar: z|bysir -------------------------------------------------------------------------------- /internal/lib/parse/readme.md: -------------------------------------------------------------------------------- 1 | Copy from github.com/tdewolff/parse/v2 2 | 3 | - Vue模板不同于html模板, vue模板对大小写敏感, 所以删除了 parse 库中的大小写转换. -------------------------------------------------------------------------------- /test/output/vHtml.html: -------------------------------------------------------------------------------- 1 |

富文本-

<h1>富文本<span>-</span></h1> -------------------------------------------------------------------------------- /test/output/voidElements.html: -------------------------------------------------------------------------------- 1 | Title -------------------------------------------------------------------------------- /test/output/slot.html: -------------------------------------------------------------------------------- 1 |
author3: bysirauthor2: bysir

(2)条信息 Infos:

标题2 备选
  • 性别: 男
  • 年龄: 25
  • author1: bysir
    -------------------------------------------------------------------------------- /test/output/component_dynamic.html: -------------------------------------------------------------------------------- 1 |

    2main propsClass 1

    -------------------------------------------------------------------------------- /test/output/parallel.html: -------------------------------------------------------------------------------- 1 |
    sleep 3
    sleep 1
    sleep 2
    sleep 3
    sleep 1
    -------------------------------------------------------------------------------- /test/output/class.html: -------------------------------------------------------------------------------- 1 | Title
    Text
    Text
    -------------------------------------------------------------------------------- /test/output/component_fragment.html: -------------------------------------------------------------------------------- 1 |
    0
  • 性别: 男
  • 1
  • 年龄: 25
  • -------------------------------------------------------------------------------- /util_test.go: -------------------------------------------------------------------------------- 1 | package vpl 2 | 3 | import "testing" 4 | 5 | func TestGetClassFromProps(t *testing.T) { 6 | c := getClassFromProps([]interface{}{ 7 | map[string]interface{}{ 8 | "t": true, 9 | }, 10 | "d", 11 | "c", 12 | }) 13 | 14 | // t d c 15 | t.Logf("%+v", c) 16 | } 17 | -------------------------------------------------------------------------------- /test/output/directive.html: -------------------------------------------------------------------------------- 1 |
    v-animate
    v-style-important
    v-show
    v-let:hello
    -------------------------------------------------------------------------------- /bench/jetviews/bench.jet: -------------------------------------------------------------------------------- 1 | 2 | test 3 | 4 | 13 | 14 | -------------------------------------------------------------------------------- /bench/struct.go: -------------------------------------------------------------------------------- 1 | package templates 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func getBenchRows(n int) []BenchRow { 8 | rows := make([]BenchRow, n) 9 | for i := 0; i < n; i++ { 10 | rows[i] = BenchRow{ 11 | ID: i, 12 | Message: fmt.Sprintf("message %d", i), 13 | Print: ((i & 1) == 0), 14 | } 15 | } 16 | return rows 17 | } 18 | -------------------------------------------------------------------------------- /test/output/main.html: -------------------------------------------------------------------------------- 1 | Title
    Text
    Infos:
    author: bysir -------------------------------------------------------------------------------- /internal/parser/parsevue_output.txt: -------------------------------------------------------------------------------- 1 | 2 |