Skip to content

Commit

Permalink
update vsix
Browse files Browse the repository at this point in the history
  • Loading branch information
panoply committed Jul 17, 2023
1 parent 5613415 commit 2a5780e
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 58 deletions.
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified shopify-liquid-4.0.0.vsix
Binary file not shown.
14 changes: 7 additions & 7 deletions test/.liquidrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"engine": "shopify",
"files": {
"data": [
"./theme/config/settings_schema.json"
],
"includes": [
"./sections/*.liquid"
]
"locales": "./theme/locales/en.default.json",
"settings": "./theme/config/settings_schema.json"
},
"format": {
"ignore": [
Expand All @@ -32,7 +28,11 @@
"preserveComment": false,
"quoteConvert": "single"
},
"markup": {},
"markup": {
"ignoreJS": true,
"ignoreJSON": true,
"ignoreCSS": true
},
"json": {
"braceAllman": true
}
Expand Down
36 changes: 21 additions & 15 deletions test/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"highlight.regexes": {
"\\bfoo\\s+": [
{
"color": "#c55353"
}
],
"\\s+[a-zA-Z]\\b100": {
"filterFileRegex": ".*\\.{js}",
"decorations": [
{
"borderColor": "#ff0000",
"color": "#ff0000"
}
]
}
"[liquid]": {
"editor.formatOnSave": true
}
// "liquid.files.shopify": {
// "locales": "./theme/locales/en.default.json",
// "settings": "./theme/config/settings_schema.json"
// },
// "liquid.config.method": "liquidrc",
// "liquid.format.ignore": [
// "./completions/*",
// "./ignores/ignore.liquid",
// "./syntax/*"
// ],
// "liquid.format.rules": {
// "liquid": {
// "forceFilter": 3
// }
// },
// "[liquid]": {
// "editor.defaultFormatter": "sissel.shopify-liquid",
// "editor.formatOnSave": true
// },
}
2 changes: 1 addition & 1 deletion test/completions/objects.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{% assign bar = 1000 %}
{% assign baz = false %}

{{ }}
{{ }}

{% # VARIABLE OBJECTS - PROPERTY COMPLETES %}

Expand Down
115 changes: 115 additions & 0 deletions test/syntax/comments/liquid-doc.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{% comment %}
- media {Boolean} ONLY THE CORRECT STRUCTURES WILL HIGHLIGHT
Renders a product thumbnail with a modal-opener
Usage:
{% render 'product-variant-options',
product: product,
option: option,
block: block
%}
Accepts:
- media: {Object} Product Media object
- media_count: {Number} Number of media objects
- position: {String} Position of the media. Used for accessible label.
- desktop_layout: {String} Layout of the media for desktop.
- mobile_layout: {String} Layout of the media for mobile.
- loop: {Boolean} Enable video looping (optional)
- modal_id: {String} The product modal that will be shown by clicking the thumbnail
- xr_button: {Boolean} Renders the "View in your space" button (shopify-xr-button) if the media is a 3D Model
- constrain_to_viewport: {Boolean} Force media height to fit within viewport
- media_fit: {String} Method ("contain" or "cover") to fit image into container
- media_width: {Float} The width percentage that the media column occupies on desktop.
- lazy_load: {Boolean} Image should be lazy loaded. Default: true (optional)
{% endcomment %}

{% comment %}
ONLY THE CORRECT STRUCTURES WILL HIGHLIGHT
{% endcomment %}

{% # RENDER TAG %}

{% render 'filename' %}

{% render 'filename', param: article.author %}

{% render 'filename' for array as item %}

{% render 'filename' with product as name, param: collection.products %}

{% render 'filename', param: 1, param2: foo.prop.foo.bar, param3: 'string', param5: false %}

{% # ASSIGNMENT LOGICS %}

{% assign false = false %}
{% assign true = true %}
{% assign foo = true %}
{% assign bar = true %}

{{ bar }}

{% if true %}{% endif %}

{% # FOR LOOP %}

{% for product in collection.products limit: 2 %}

{{ product.title }}

{% endfor %}


{% # FOR LOOP INFERRED ARRAY ITERATION %}

{% for variable in inferred %}{% endfor %}

{% for variable in (1..200) %}{% endfor %}

{% render 'filename'
, param: 1.20
, param2: foo.prop.foo.bar
, param3: 'string'
, param5: false
, param_foo: nil
, 123_param: product.available %}

{% render 'filename',
param: 1.20,
param2: foo.prop.foo.bar,
param3: 'string',
param5: false,
param_foo: nil,
123_param: product.available %}

{% # CONDITION %}

{% if condition == product.available %}{% elsif condition %}{% endif %}{% case variable %}
{% when condition == product.available %}{% else %}{% endcase %}

{% # FOR LOOP %}

{% for product in collection.products limit: 2 %}

{{ product.title }}{% endfor %}

{% for variable in (1..200) %}

expression

{% endfor %}

{% for product in collection.products reversed %}

{{ product.title }}

{% endfor %}

{% for item in collection %}

{% endfor %}
25 changes: 19 additions & 6 deletions test/syntax/embedded/javascript.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,29 @@

<!-- TEST: Import Injection when Liquid tag expression is defined -->

<!-- @prettify-ignore-next -->

<!-- esthetic-ignore-start -->
<script type="module">
import {} from './'
import * as x from '';
import {{ 'file.js' | asset_url | json }};
import {{ 'file.js' | asset_url | json }};
import {} from './'
import * as x from '';
import {{ 'file.js' | asset_url | json }};
import {{ 'file.js' | asset_url | json }};
var sideArrows = {
left: {{ arrow_left | json }},
right: {{ arrow_right | json }},
}
{% comment %}
Some Comment
{% endcomment %}
const foo = 'bar';
/**
* @param
*/
const foo = 'bar';
</script>
13 changes: 4 additions & 9 deletions test/test.liquid
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{% schema %}
{}
{% endschema %}

{% liquid

comment
<html>
{% comment %} esthetic-ignore-start {% endcomment %}
foo
endcomment
%}
{% comment %} esthetic-ignore-end {% endcomment %}
</html>
2 changes: 1 addition & 1 deletion test/toggle/file-1.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{ bar.image.alt }}

{{ bar | append }}
{{ bar | append: }}
{{ bar | append: }}
{{ pr }}
{{ article.author | prepend | append: block }}

Expand Down
26 changes: 11 additions & 15 deletions test/toggle/file-2.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@


{{ s..badge_corner_radius | file_url: b.sale_badge_color_scheme }}
<div class="col-{{ block.settings.xs }} col-md-{{ block.settings.md }} col-xl-{{
block.settings.xl }}">
<div class="col-{{ block.settings.xs }} col-md-{{ block.settings.md }} col-xl-{{ block.settings.xl }}">
<div class="fm-float mt-{{ block.settings.mt }} mb-{{ block.settings.mb }}">

{{ b. }} <input
{{ b }}


<input
autocomplete="{{ block.settings.autocomplete }}"
class="fm-input"
data-action="form#onInput"
Expand All @@ -25,24 +27,20 @@
required="{{ block.settings.required }}"
type="{{ block.type }}" /> {{ 'products' | t }}

<label class="fm-label"
for="{{ block.settings.name }}">

<label class="fm-label" for="{{ block.settings.name }}">
{{ block.settings.placeholder }}
</label>

{% assign items = block.settings.items
| newline_to_br
| newline_to_br
| split: '<br />' %}
{% assign items = block.settings.items | newline_to_br | newline_to_br | split: '<br />' %}

</div>
</div>

{% endif %}
{{ }}

{% schema %}

{% schema %}
{
"blocks": [],
"settings": [
Expand All @@ -52,8 +50,7 @@
"label": "Some Check",
"default": true,
"info": "Hellow some check"
},
{
}, {
"type": "range",
"id": "some",
"label": "Some",
Expand All @@ -65,5 +62,4 @@
}
]
}

{% endschema %}
{% endschema %}

0 comments on commit 2a5780e

Please sign in to comment.