1.0.5 • Published 4 years ago

smarty v1.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Smarty lite for node

the light weight Smarty engine for node.

Node版的,简约的Smarty语法。

Usage

npm install smarty

Feature

Grammar of Lite & Common & Widely used: comment, var assign, if-else, foreach, for, include.

支持语法:注释,var赋值,if-else,foreach,for,include

Support Input Parameter, Parameter could be a Function.

支持参数,参数可以是函数表达式。

Support Customize the template path and cache mode.

支持自定义路径,缓存模式等。

Could come to a compile Function expression, Could use in express js.

支持compile编译表达式,支持express。

Cache Mode

Cache Mode

  • autoCache template file until file modified.
  • watchWatch template file change, then refresh the cache.
  • compileCache the compile function, ignore the file stat.
  • freezeCache output by input parameter.

缓存模式

  • auto根据文件修改时间对模板进行缓存。
  • watch监控文件修改并刷新缓存。
  • compile编译缓存,不管文件修改情况。
  • freeze根据输入参数进行缓存,在输入参数没有修改之前,缓存不会过期。

License

ISC

1.0.5

4 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

9 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

12 years ago