项目作者: HamiStudios

项目描述 :
a simple nodejs render engine
高级语言: JavaScript
项目地址: git://github.com/HamiStudios/crather.git
创建时间: 2018-02-07T18:24:13Z
项目社区:https://github.com/HamiStudios/crather

开源协议:MIT License

下载




crather

a simple nodejs render engine






Features:

  • Can be used to seamlessly with express to render views
  • Supports templates and scripts to create dynamic content
  • Can be used as a standalone render engine which is great for HTML emails
  • Can be used to process any file type HTML, CSS, Text you name it

Installation

  1. $ npm install --save @hamistudios/crather

Quick start

  1. <!-- example.crather -->
  2. <h1>{{ message }}</h1>
  1. // index.js
  2. const Crather = require('@hamistudios/crather');
  3. let crather = new Crather({
  4. data: {
  5. message: 'Hello World'
  6. }
  7. });
  8. crather.parse('./example.crather', function(err, result) {
  9. if(err) console.error(err);
  10. else console.log(result.getRendered());
  11. });

Output:

  1. <h1>Hello World</h1>

For more help and information head over to our website.

Documentation

You can view all documentation on the crather website.