https://github.com/rendfall/test-templates
Demo:
https://github.com/rendfall/test-templates
Last synced: 12 months ago
JSON representation
Demo:
- Host: GitHub
- URL: https://github.com/rendfall/test-templates
- Owner: rendfall
- Created: 2016-06-13T23:59:19.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:15:32.000Z (over 3 years ago)
- Last Synced: 2024-03-21T06:43:44.864Z (about 2 years ago)
- Language: JavaScript
- Homepage: http://rendfall.github.io/test-templates/demo/
- Size: 700 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Templates
> Tiny library to generate template with data binding.
## Usage
Template:
```html
{{ title }}
{{ nodef }}
```
Render:
```js
var $content = document.getElementById('content');
$content.innerHTML = Template.compile($content.innerHTML, {
title: 'This is an example',
link: 'http://fakeimg.pl/250x100/ff0000/'
});
```
## Unit tests
```
$ npm test
```