Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options and apis to cammelcase #109

Closed
harttle opened this issue Feb 26, 2019 · 0 comments
Closed

options and apis to cammelcase #109

harttle opened this issue Feb 26, 2019 · 0 comments
Milestone

Comments

@harttle
Copy link
Owner

harttle commented Feb 26, 2019

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:

  1. 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.
  2. Rename API/Interfaces into camelCase, such as liquid_method_missing should be liquidMethodMissing
  3. JavaScript toString is used rather than liquid-like inspect for object output. Differences between toString and to_s are documented here
  4. 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:

  1. the template syntax will be fully compatible
  2. the tags behaviors will be fully compatible
  3. 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

@harttle harttle added this to the 8.0.0 milestone Feb 26, 2019
harttle added a commit that referenced this issue Feb 27, 2019
Deprecate snake_cased options and APIs, sed #109
harttle pushed a commit that referenced this issue Feb 28, 2019
# [7.4.0](v7.3.1...v7.4.0) (2019-02-28)

### Bug Fixes

* math filters now return number, resolves [#110](#110) ([b4acdb4](b4acdb4))

### Features

* exported Drop interface for [#107](#107) ([7bee9fc](7bee9fc)), closes [#109](#109)
harttle added a commit that referenced this issue Mar 10, 2019
BREAKING CHANGES: Options and method names in JavaScript API is now
renamed to cammelCase, for a complete list see #109
harttle added a commit that referenced this issue Mar 10, 2019
BREAKING CHANGE: Options and method names in JavaScript API are now renamed to cammelCase, for a complete list see #109
harttle pushed a commit that referenced this issue Mar 10, 2019
# [8.0.0](v7.5.1...v8.0.0) (2019-03-10)

### Code Refactoring

* use camelCase for JavaScript APIs ([64e0c87](64e0c87))

### Features

* promise support for drops, working on [#65](#65) ([4a8088d](4a8088d))

### BREAKING CHANGES

* Options and method names in JavaScript API are now renamed to cammelCase, for a complete list see #109
@harttle harttle closed this as completed Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant