mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
17 lines
394 B
TypeScript
17 lines
394 B
TypeScript
import { Liquid } from 'liquidjs'
|
|
import { getOutputs } from './get-outputs'
|
|
|
|
const engine = new Liquid({
|
|
root: __dirname,
|
|
extname: '.liquid'
|
|
})
|
|
|
|
const templates = engine.parseFileSync('todolist')
|
|
|
|
for (const output of getOutputs(templates)) {
|
|
const token = output.token
|
|
const [line, col] = token.getPosition()
|
|
const text = token.getText()
|
|
console.log(`[${line}:${col}] ${text}`)
|
|
}
|