https://github.com/shyrz/simplate
A simple JavaScript template engine.
https://github.com/shyrz/simplate
javascript-template-engine template-engine
Last synced: about 2 months ago
JSON representation
A simple JavaScript template engine.
- Host: GitHub
- URL: https://github.com/shyrz/simplate
- Owner: shyrz
- License: mit
- Created: 2016-08-07T12:00:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-03T02:17:01.000Z (almost 7 years ago)
- Last Synced: 2025-02-04T23:02:21.988Z (3 months ago)
- Topics: javascript-template-engine, template-engine
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simplate
> A Simple JavaScript Template Engine.
## Get Started
### Grammar
**Evaluate(过程控制)**
```
{{ for ( var item in data ) { }}
Some code here...
{{ } }}
```**Interpolate(输出控制)**
```
{{= data.name }}
```**NonEscape(非编码输出)**
```
{{! data.url }}
```**Comment(代码注释)**
```
{{# Some comments here... }}
```## TODO
1. `errorHandler()`
2. Use `with() {}`
3. ...
## Update Logs
### v0.1.0
- 完成了模板基本架构
- 实现了基础功能 `evaluate` 和 `interpolate`
- 添加了功能 `comment`### v0.1.1
- 添加了功能 `nonEscape`
## License
Released under the [MIT](https://github.com/Phantr4x/Simplate/blob/master/LICENSE) License
© Phantr4x