0.1.4 • Published 10 years ago

sten-js v0.1.4

Weekly downloads
3
License
WTFPL
Repository
github
Last release
10 years ago

sten-js

Simple Template Engine

sten-js is a basic easy-to-use template engine for nodejs. All code placed inside <?stn and stn?> tags will be compiled into a separate javascript context.

How to Use

var sten = require("../index.js");
var str = "hi this is some random <?stn var arr= ['s', 't', 'r', 'i', 'n', 'g'];  print(arr.join('-'));  stn?> to parse";
sten.createContext();
sten.parse(str, function(msg) {
    console.log(msg);
});

Some additional examples include cin() method:

Notes

Tested with the following node versions:

  • 0.10.28

License

(The WTFPL License)

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004

Copyright (C) 2004 Sam Hocevar sam@hocevar.net

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  1. You just DO WHAT THE FUCK YOU WANT TO.
0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago