mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
13 lines
294 B
JavaScript
Executable File
13 lines
294 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const Liquid = require('..').Liquid
|
|
|
|
let tpl = ''
|
|
process.stdin.on('data', chunk => (tpl += chunk))
|
|
process.stdin.on('end', () => render(tpl))
|
|
|
|
async function render (tpl) {
|
|
const liquid = new Liquid()
|
|
const html = await liquid.parseAndRender(tpl)
|
|
console.log(html)
|
|
} |