blended-lang

0.0.6 • Public • Published

Blended-Lang

NPM Version NPM Downloads

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.

Package Sidebar

Install

npm i blended-lang

Weekly Downloads

7

Version

0.0.6

License

ISC

Unpacked Size

1.36 MB

Total Files

102

Last publish

Collaborators

  • shubhamy