xste🍮
extra small template engine (under 360bytes, not gzipped)
recommend using vdom.
THIS ENGINE DOESN'T ESCAPE.
escape on server side recommend.
don't let the client if possible.
for user experience.
xste is beta-release.
the interface could change at any time.
How to use(Browser)
Hello!
- foo
- bar
How to use(node)
const fs = :const xste = : let xste_agent;fs; //@Browser-likexste_agent = ;xste_agent;const result = await xste_agent;assert; //@LoadFromFile,Dynamicxste_agent = ;await xste_agent;//DynamicLoad when compile(template_name == filename)const result = await xste_agent;assert; //@LoadFromFile,Manualxste_agent = ;await xste_agent;const result = await xste_agent;assert; //@Bundleconst bundled_source = await xste;fs; //and more methods...
Do you need full documentation?
see /test/**/*.js
, almost cover all methods.
git clone git@github.com:mochiya98/xste.gitcd xstenpm inpm test