feat: with & for in render tag, closes #195

This commit is contained in:
harttle
2020-03-04 07:08:54 +08:00
parent aa27a6cd7b
commit 6ea6881f08
67 changed files with 1108 additions and 724 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env node
const Liquid = require('..').Liquid
var contextArg = process.argv.slice(2)[0]
var context = {}
const contextArg = process.argv.slice(2)[0]
let context = {}
if (contextArg) {
if (contextArg.endsWith('.json')) {
@@ -20,5 +20,5 @@ process.stdin.on('end', () => render(tpl))
async function render (tpl) {
const liquid = new Liquid()
const html = await liquid.parseAndRender(tpl, context)
console.log(html)
process.stdout.write(html)
}