Repository navigation
v0.1.15
Added
-
lsf fmtformats the Liquid files of a theme the way Prettier does with Shopify's Liquid plugin, without Node: Liquid, HTML, the JSON of{% schema %}, the CSS of<style>,{% style %}and{% stylesheet %}, and the JavaScript of<script>and{% javascript %}.lsf fmt --checklists the files that are not formatted and fails if there are any, for CI. The 283 files of Shopify's Horizon theme are checked in 0.08 s, where Prettier takes 1.6 s.- It reads the configuration Prettier reads:
.prettierrc,.editorconfigand.prettierignore.--option printWidth=100sets an option from the command line, and--stdin(with--stdin-filepath) formats what an editor sends. Prettier's options for JavaScript (semi,trailingComma,arrowParens, ...) apply too. - Files named one by one, as a commit hook names them, are formatted when they are
.liquidfiles that.prettierignoredoes not name. A file is replaced in one step, with its permissions. A file that cannot be formatted is reported, and the others are formatted all the same.
- It reads the configuration Prettier reads:
-
Feature previews.
--preview <name>(orLSF_PREVIEW) turns on a feature preview of Shopify, as a development store can. Without it, a page renders as on a live store: a theme that uses a preview gets the error a live store gives, andlsfnames the preview to turn on. The first one isliquid-july-26, Shopify's "Liquid July '26 changes":{% block 'name', parameter: value %}content{% endblock %}rendersblocks/name.liquidfrom a template or a layout. The block sees its parameters and its body, ascontentorblock.content; a parameter named after a setting of its schema setsblock.settings; arrays can be written in place. With it, Shopify's Skeleton theme renders.{% partial 'name' %}and@shopify/partial-rendering: a theme that uses partials gets an import map for the module, andpartials.refresh('name')swaps in the region from the server, keeping focus, form values and scroll, in loops and table rows too. Shopify has not published its own markup yet: lsf marks a partial with HTML comments.
Fixed
- A
file_referencemetafield or metaobject field that points to a video (.mp4,.mov,.webm,.m4v) is a video, as on Shopify:sources,preview_imageandvideo_tagwork, andmetafield_tagprints a<video>as Shopify does. It was a plain file with only aurl, so themes rendered it empty. The poster is the.jpgof the same name. A.movis announced asvideo/mp4, as Shopify announces the MP4 it makes of it, so that Chrome and Firefox play it; thevideosetting does the same. - Files of
files/are served in parts when the browser asks with aRangeheader. Safari played no video without it, and no browser could seek in one. Only the part asked for is read, and a part is never compressed..m4vfiles are served asvideo/mp4. - Metafield values are the objects Shopify gives for four more types. A
coloris a color (.red,.rgb...), not text. Anarticle_referenceis the article, namedblog/articleor by the handle of an article that only one blog has. Every measurement type (distance,temperature,duration...) has atype, avalueand aunit, andmetafield_tagprints it with two decimals at most, where onlyweight,volumeanddimensionwere printed. Amoneyhas thecurrencyit is written in, and is formatted in it:€5,00 EURin a store that sells in dollars. request.locale.direction(and that of every locale) isrtlfor Arabic, Hebrew, Persian and the other languages written right to left, and follows the script when the locale names one (pa-Arab). Horizon setsdiron<html>from it.- The
applicable_disclosuresfilter keeps every disclosure, as Shopify does when it cannot tell the buyer's country. It was an unknown filter that printed a warning.
What's Changed
New Contributors
Full Changelog: v0.1.14...v0.1.15