https://github.com/nicolas-van/jiko
Full Featured Template Engine for JavaScript
https://github.com/nicolas-van/jiko
javascript template-engine
Last synced: over 1 year ago
JSON representation
Full Featured Template Engine for JavaScript
- Host: GitHub
- URL: https://github.com/nicolas-van/jiko
- Owner: nicolas-van
- License: mit
- Archived: true
- Created: 2013-03-06T15:22:44.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T10:18:56.000Z (over 3 years ago)
- Last Synced: 2025-02-26T05:17:20.867Z (over 1 year ago)
- Topics: javascript, template-engine
- Language: JavaScript
- Homepage: http://nicolas-van.github.io/jiko/
- Size: 3.31 MB
- Stars: 71
- Watchers: 5
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Jiko
{% raw %}
[](https://travis-ci.org/nicolas-van/jiko) [](https://www.npmjs.com/package/jiko)
Jiko is a modern and easy to use template engine for Javascript. Its objective is to provide to Javascript programmers a
way to write templates with an engine as powerful as server-side state of the art template engines like Jinja and Mako.
```
<%
var rows = _.map(_.range(0, 10), function(el) { return _.range(0, 10); });
%>
{% function name="makeRow" %}
% a.row.forEach(function(name) {
${name}
% });
{% end %}
% rows.forEach(function(row) {
%{makeRow({row: row})}
% });
```
Jiko's features:
* Its syntax is as simple and direct as possible. Influenced by well-known template engines.
* *Don't reinvent the wheel!* Why use a new language for expressions when you can use JavaScript?
* Allows multiple templates to be defined in a single template file.
* Compiles templates directly to Javascript to be one of the fastest JavaScript template engines ever.
* Allows browser-side on-the-fly compilation for development and server-side compilation for production.
* Works in a browser (IE7, Chrome, Firefox) and inside Node.js.
* Uses the MIT open source licence.
Jiko is still in development. You can help to improve it on Github.
Interested? Take a look at the [Documentation](./docs/docs.md).
{% endraw %}