liquidscript
v2.0.1
Published
Readme
LiquidScript
Liquid templates for JavaScript.
import { parse } from "liquidscript";
const template = parse("Hello, {{ you }}!");
// Sync
console.log(template.renderSync({ you: "World" })); // Hello, World!
console.log(template.renderSync({ you: "Liquid" })); // Hello, Liquid!
// Async
template.render({ you: "World" }).then(console.log); // Hello, World!
template.render({ you: "Liquid" }).then(console.log); // Hello, Liquid!
// Or, using await
(async () => {
console.log(await template.render({ you: "World" })); // Hello, World!
console.log(await template.render({ you: "Liquid" })); // Hello, Liquid!
})();Links
- Documentation: https://jg-rp.github.io/liquidscript/
- API documentation: https://jg-rp.github.io/liquidscript/api
- Filter reference: https://jg-rp.github.io/liquidscript/reference/filters
- Tag reference: https://jg-rp.github.io/liquidscript/reference/tags
- Change log: https://github.com/jg-rp/liquidscript/blob/main/CHANGELOG.md
- NPM: https://www.npmjs.com/package/liquidscript
- Issue tracker: https://github.com/jg-rp/liquidscript/issues
Contributing
Please see Contributing to LiquidScript
License
LiquidScript is distributed under the terms of the MIT license.
LiquidScript is an implementation of Shopify/liquid. During development we reference Shopify/liquid and make use of Shopify/liquid-spec. See LICENSE.liquid and LICENSE.liquid-spec, both MIT licensed.
