blended-lang
v0.0.6
Published
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url]
Downloads
13
Maintainers
Readme
Blended-Lang
Blended is a cross-platform template language spec that ensures compatibility with Django, Jinja, Twig & more. View the docs here.
Installation
npm install blended-lang
Documentation
See here.
Usage
Var env = new Blended.Environment();
env.renderString( ‘Hello {{ username }}’ ,{ username: ‘James’ });
You usually won't use renderString, instead you should write templates in individual files and use render. That way you can inherit and include templates.
env.render('index.html', { name: 'John' }); This will render content of ‘index.html’ with name “John”.
Tests
Run the tests with npm run test
.
To run the default Nunjucks Test cases run the following command npm run test:default
How to Use Blended-Lint
npm install blended-lint
use command blended-lint filename data
where filename is the name of the file that need's to be validated and data is optinal argument which is any additional data you want's to pass.