One of the main purpose of this repo is provide a shopify-compliant template engine in JavaScript. Now I find something wrong with the code base: there're more and more shopify-like or ruby-like code and they look weird. So here's the plan:
- Rename snake_cased liquidjs options (such as
strict_filters) to camelCase (like strictFilters), which is widely used in JavaScript world and so in this repo.
- Rename API/Interfaces into camelCase, such as
liquid_method_missing should be liquidMethodMissing
- JavaScript
toString is used rather than liquid-like inspect for object output. Differences between toString and to_s are documented here
- Behavior for math filters will stick to JavaScript Number, i.e.
{{0.3 | minus: 0.1}} will output "0.19999999"
That does not mean liquidjs is no longer compatible to shopify/liquid, but it will do more to embrace the JavaScript way. Despite the APIs and options will be different, the following behaviors/rules will always remain the same:
- the template syntax will be fully compatible
- the tags behaviors will be fully compatible
- the filters/outputs will be almost compatible, I'll do my best to resolve or claim the language differences like
undefined, null, NaN.
From now on snake_case will be deprecated, and will be remove in the next major version, which is 8.0.0
One of the main purpose of this repo is provide a shopify-compliant template engine in JavaScript. Now I find something wrong with the code base: there're more and more shopify-like or ruby-like code and they look weird. So here's the plan:
strict_filters) to camelCase (likestrictFilters), which is widely used in JavaScript world and so in this repo.liquid_method_missingshould beliquidMethodMissingtoStringis used rather than liquid-likeinspectfor object output. Differences betweentoStringandto_sare documented here{{0.3 | minus: 0.1}}will output"0.19999999"That does not mean liquidjs is no longer compatible to shopify/liquid, but it will do more to embrace the JavaScript way. Despite the APIs and options will be different, the following behaviors/rules will always remain the same:
undefined,null,NaN.From now on snake_case will be deprecated, and will be remove in the next major version, which is 8.0.0