const pug = require('pug');
// Compile the source code
const compiledFunction = pug.compileFile('test.pug');
// Render a set of data in html
console.log(compiledFunction({"name": "Tim"}));
In 2015, jade was renamed to pug(by Timothy Gu)
<div>
<h1>Ocean's Eleven</h1>
<ul>
<li>Comedy</li>
<li>Thriller</li>
</ul>
<p>Danny Ocean and his eleven accomplices plan to rob
three Las Vegas casinos simultaneously.</p>
</div>
Becomes
div
h1 Ocean's Eleven
ul
li Comedy
li Thriller
p.
Danny Ocean and his eleven accomplices plan to rob
three Las Vegas casinos simultaneously.