express-lml
Express view engine for LML - an HTML alternative
Install
In your express.js project directory:
npm install express-lml --save-dev
Usage
use the exported loader and pass your express app instance:
loadViewEngine(app);
You can also pass options for parsing and output (to minify, order attributes etc):
loadViewEngine(app, {parse: parseConfig, output: outputConfig});
See LML README for available options.
Example
views/index.lml
:
!DOCTYPE htmlhtml head title ; hello body h1 ; hello world!
app.js
:
const express = ;const expressLML = ; const app = ;const port = 3000; expressLML; // default folder for your LML filesapp; app; app;