mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 22:10:41 -07:00
fix: break/continue omitting output before them, #123
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
This commit is contained in:
+3
-3
@@ -17,17 +17,17 @@ const template = `
|
||||
{% block body %}a small body{% endblock %}
|
||||
`
|
||||
|
||||
export default function () {
|
||||
export function layout () {
|
||||
console.log('--- layout ---')
|
||||
return new Promise(resolve => {
|
||||
new Benchmark.Suite('layout')
|
||||
.add('cache=false', {
|
||||
defer: true,
|
||||
fn: (d: any) => engine.parseAndRender(template, {}).then(x => d.resolve(x))
|
||||
fn: (d: any) => engine.parseAndRender(template, {}).then((x: any) => d.resolve(x))
|
||||
})
|
||||
.add('cache=true', {
|
||||
defer: true,
|
||||
fn: (d: any) => cachingEngine.parseAndRender(template, {}).then(x => d.resolve(x))
|
||||
fn: (d: any) => cachingEngine.parseAndRender(template, {}).then((x: any) => d.resolve(x))
|
||||
})
|
||||
.on('cycle', (event: any) => console.log(String(event.target)))
|
||||
.on('complete', resolve)
|
||||
|
||||
Reference in New Issue
Block a user