@skeptools/skep-organization-project 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +23 -0
- package/.jsii +164 -0
- package/.projenrc.ts +29 -0
- package/API.md +3610 -0
- package/LICENSE +202 -0
- package/README.md +8 -0
- package/files/generated/.seed +1 -0
- package/files/scaffolding/.seed +1 -0
- package/files/scaffolding/README.md.liquid +43 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +14 -0
- package/lib/skep-organization-project.d.ts +7 -0
- package/lib/skep-organization-project.js +24 -0
- package/node_modules/liquidjs/CHANGELOG.md +1015 -0
- package/node_modules/liquidjs/LICENSE +21 -0
- package/node_modules/liquidjs/README.md +163 -0
- package/node_modules/liquidjs/bin/liquid.js +24 -0
- package/node_modules/liquidjs/dist/builtin/filters/array.d.ts +15 -0
- package/node_modules/liquidjs/dist/builtin/filters/date.d.ts +2 -0
- package/node_modules/liquidjs/dist/builtin/filters/html.d.ts +4 -0
- package/node_modules/liquidjs/dist/builtin/filters/index.d.ts +7 -0
- package/node_modules/liquidjs/dist/builtin/filters/math.d.ts +11 -0
- package/node_modules/liquidjs/dist/builtin/filters/misc.d.ts +5 -0
- package/node_modules/liquidjs/dist/builtin/filters/string.d.ts +16 -0
- package/node_modules/liquidjs/dist/builtin/filters/url.d.ts +2 -0
- package/node_modules/liquidjs/dist/builtin/tags/assign.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/block.d.ts +8 -0
- package/node_modules/liquidjs/dist/builtin/tags/break.d.ts +5 -0
- package/node_modules/liquidjs/dist/builtin/tags/capture.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/case.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/comment.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/continue.d.ts +5 -0
- package/node_modules/liquidjs/dist/builtin/tags/cycle.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/decrement.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/echo.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/for.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/if.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/include.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/increment.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/index.d.ts +5 -0
- package/node_modules/liquidjs/dist/builtin/tags/inline-comment.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/layout.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/liquid.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/raw.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/render.d.ts +13 -0
- package/node_modules/liquidjs/dist/builtin/tags/tablerow.d.ts +3 -0
- package/node_modules/liquidjs/dist/builtin/tags/unless.d.ts +3 -0
- package/node_modules/liquidjs/dist/cache/cache.d.ts +7 -0
- package/node_modules/liquidjs/dist/cache/lru.d.ts +14 -0
- package/node_modules/liquidjs/dist/context/block-mode.d.ts +5 -0
- package/node_modules/liquidjs/dist/context/context.d.ts +53 -0
- package/node_modules/liquidjs/dist/context/scope.d.ts +6 -0
- package/node_modules/liquidjs/dist/drop/blank-drop.d.ts +4 -0
- package/node_modules/liquidjs/dist/drop/block-drop.d.ts +10 -0
- package/node_modules/liquidjs/dist/drop/comparable.d.ts +8 -0
- package/node_modules/liquidjs/dist/drop/drop.d.ts +3 -0
- package/node_modules/liquidjs/dist/drop/empty-drop.d.ts +10 -0
- package/node_modules/liquidjs/dist/drop/forloop-drop.d.ts +15 -0
- package/node_modules/liquidjs/dist/drop/null-drop.d.ts +10 -0
- package/node_modules/liquidjs/dist/drop/tablerowloop-drop.d.ts +10 -0
- package/node_modules/liquidjs/dist/emitters/emitter.d.ts +11 -0
- package/node_modules/liquidjs/dist/emitters/keeping-type-emitter.d.ts +5 -0
- package/node_modules/liquidjs/dist/emitters/simple-emitter.d.ts +5 -0
- package/node_modules/liquidjs/dist/emitters/streamed-emitter-browser.d.ts +10 -0
- package/node_modules/liquidjs/dist/emitters/streamed-emitter.d.ts +9 -0
- package/node_modules/liquidjs/dist/fs/browser.d.ts +7 -0
- package/node_modules/liquidjs/dist/fs/fs.d.ts +20 -0
- package/node_modules/liquidjs/dist/fs/loader.d.ts +24 -0
- package/node_modules/liquidjs/dist/fs/node-require.d.ts +2 -0
- package/node_modules/liquidjs/dist/fs/node.d.ts +9 -0
- package/node_modules/liquidjs/dist/liquid-options.d.ts +128 -0
- package/node_modules/liquidjs/dist/liquid.browser.esm.js +3523 -0
- package/node_modules/liquidjs/dist/liquid.browser.min.js +2 -0
- package/node_modules/liquidjs/dist/liquid.browser.min.js.map +1 -0
- package/node_modules/liquidjs/dist/liquid.browser.umd.js +4811 -0
- package/node_modules/liquidjs/dist/liquid.browser.umd.js.map +1 -0
- package/node_modules/liquidjs/dist/liquid.d.ts +43 -0
- package/node_modules/liquidjs/dist/liquid.node.cjs.js +4820 -0
- package/node_modules/liquidjs/dist/liquid.node.esm.js +3540 -0
- package/node_modules/liquidjs/dist/parser/filter-arg.d.ts +5 -0
- package/node_modules/liquidjs/dist/parser/match-operator.d.ts +2 -0
- package/node_modules/liquidjs/dist/parser/parse-stream.d.ts +16 -0
- package/node_modules/liquidjs/dist/parser/parse-string-literal.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/parser.d.ts +22 -0
- package/node_modules/liquidjs/dist/parser/token-kind.d.ts +15 -0
- package/node_modules/liquidjs/dist/parser/tokenizer.d.ts +66 -0
- package/node_modules/liquidjs/dist/parser/whitespace-ctrl.d.ts +3 -0
- package/node_modules/liquidjs/dist/render/boolean.d.ts +3 -0
- package/node_modules/liquidjs/dist/render/expression.d.ts +14 -0
- package/node_modules/liquidjs/dist/render/operator.d.ts +5 -0
- package/node_modules/liquidjs/dist/render/render.d.ts +8 -0
- package/node_modules/liquidjs/dist/template/filter/filter-impl-options.d.ts +4 -0
- package/node_modules/liquidjs/dist/template/filter/filter-impl.d.ts +6 -0
- package/node_modules/liquidjs/dist/template/filter/filter-map.d.ts +13 -0
- package/node_modules/liquidjs/dist/template/filter/filter.d.ts +12 -0
- package/node_modules/liquidjs/dist/template/html.d.ts +10 -0
- package/node_modules/liquidjs/dist/template/output.d.ts +11 -0
- package/node_modules/liquidjs/dist/template/tag/hash.d.ts +17 -0
- package/node_modules/liquidjs/dist/template/tag/tag-impl-options.d.ts +10 -0
- package/node_modules/liquidjs/dist/template/tag/tag-impl.d.ts +6 -0
- package/node_modules/liquidjs/dist/template/tag/tag-map.d.ts +6 -0
- package/node_modules/liquidjs/dist/template/tag/tag.d.ts +10 -0
- package/node_modules/liquidjs/dist/template/template-impl.d.ts +4 -0
- package/node_modules/liquidjs/dist/template/template.d.ts +7 -0
- package/node_modules/liquidjs/dist/template/value.d.ts +13 -0
- package/node_modules/liquidjs/dist/tokens/delimited-token.d.ts +8 -0
- package/node_modules/liquidjs/dist/tokens/filter-token.d.ts +7 -0
- package/node_modules/liquidjs/dist/tokens/hash-token.d.ts +12 -0
- package/node_modules/liquidjs/dist/tokens/html-token.d.ts +11 -0
- package/node_modules/liquidjs/dist/tokens/identifier-token.d.ts +10 -0
- package/node_modules/liquidjs/dist/tokens/liquid-tag-token.d.ts +7 -0
- package/node_modules/liquidjs/dist/tokens/literal-token.d.ts +9 -0
- package/node_modules/liquidjs/dist/tokens/number-token.d.ts +7 -0
- package/node_modules/liquidjs/dist/tokens/operator-token.d.ts +21 -0
- package/node_modules/liquidjs/dist/tokens/output-token.d.ts +5 -0
- package/node_modules/liquidjs/dist/tokens/property-access-token.d.ts +9 -0
- package/node_modules/liquidjs/dist/tokens/quoted-token.d.ts +8 -0
- package/node_modules/liquidjs/dist/tokens/range-token.d.ts +11 -0
- package/node_modules/liquidjs/dist/tokens/tag-token.d.ts +7 -0
- package/node_modules/liquidjs/dist/tokens/token.d.ts +12 -0
- package/node_modules/liquidjs/dist/tokens/toplevel-token.d.ts +4 -0
- package/node_modules/liquidjs/dist/tokens/value-token.d.ts +5 -0
- package/node_modules/liquidjs/dist/types.d.ts +30 -0
- package/node_modules/liquidjs/dist/util/assert.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/async.d.ts +3 -0
- package/node_modules/liquidjs/dist/util/character.d.ts +8 -0
- package/node_modules/liquidjs/dist/util/collection.d.ts +2 -0
- package/node_modules/liquidjs/dist/util/error.d.ts +29 -0
- package/node_modules/liquidjs/dist/util/liquid-date.d.ts +19 -0
- package/node_modules/liquidjs/dist/util/literal.d.ts +11 -0
- package/node_modules/liquidjs/dist/util/operator-trie.d.ts +5 -0
- package/node_modules/liquidjs/dist/util/strftime.d.ts +2 -0
- package/node_modules/liquidjs/dist/util/timezone-date.d.ts +39 -0
- package/node_modules/liquidjs/dist/util/type-guards.d.ts +22 -0
- package/node_modules/liquidjs/dist/util/underscore.d.ts +37 -0
- package/node_modules/liquidjs/package.json +165 -0
- package/package.json +133 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Jun Yang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# liquidjs
|
|
2
|
+
[](https://www.npmjs.org/package/liquidjs)
|
|
3
|
+
[](https://www.npmjs.org/package/liquidjs)
|
|
4
|
+
[](https://coveralls.io/github/harttle/liquidjs?branch=master)
|
|
5
|
+
[](https://github.com/harttle/liquidjs/actions/workflows/check.yml?query=branch%3Amaster)
|
|
6
|
+
[](https://github.com/harttle/liquidjs/blob/master/LICENSE)
|
|
7
|
+
[](https://github.com/harttle/liquidjs)
|
|
8
|
+
|
|
9
|
+
A simple, expressive and safe [Shopify][shopify/liquid] / Github Pages compatible template engine in pure JavaScript.
|
|
10
|
+
**The purpose of this repo** is to provide a standard Liquid implementation for the JavaScript community so that [Jekyll sites](https://jekyllrb.com), [Github Pages](https://pages.github.com/) and [Shopify templates](https://themes.shopify.com/) can be ported to Node.js without pain.
|
|
11
|
+
|
|
12
|
+
* [Documentation][doc]
|
|
13
|
+
* Please star [LiquidJS on GitHub][github]!
|
|
14
|
+
* Support [LiquidJS on Open Collective][oc] or [Patreon][patreon]
|
|
15
|
+
|
|
16
|
+
<p align="center"><a href="https://liquidjs.com"><img height="155px" width="155px" src="https://liquidjs.com/icon/mstile-310x310.png" alt="logo"></a></p>
|
|
17
|
+
|
|
18
|
+
## What's it like?
|
|
19
|
+
|
|
20
|
+
Basically there're two types of Liquid syntax: tags enclosed by `{% %}` and outputs enclosed by `{{ }}`. A Liquid template looks like:
|
|
21
|
+
|
|
22
|
+
```liquid
|
|
23
|
+
{% if username %}
|
|
24
|
+
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
|
|
25
|
+
{% endif %}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[A live demo](https://liquidjs.com/playground.html) is also available and here's a [quick tutorial](https://liquidjs.com/tutorials/intro-to-liquid.html) for Liquid syntax.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Install from npm in Node.js:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install liquidjs
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or use the UMD bundle from jsDelivr:
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
More details, refer to [The Setup Guide][setup].
|
|
46
|
+
|
|
47
|
+
## Related Projects
|
|
48
|
+
|
|
49
|
+
* [@11ty/eleventy](https://www.npmjs.com/package/@11ty/eleventy): A simpler static site generator. An alternative to Jekyll. Written in JavaScript. Transforms a directory of templates (of varying types) into HTML.
|
|
50
|
+
* [gulp-liquidjs](https://www.npmjs.com/package/@tuanpham-dev/gulp-liquidjs): A shopify compatible Liquid template engine for Gulp using liquidjs.
|
|
51
|
+
* [grunt-liquify](https://www.npmjs.com/package/grunt-liquify): A Grunt task to process Liquid using liquidjs. Use it to add Liquid magic to your scripts and css assets.
|
|
52
|
+
* [react-liquid](https://github.com/aquibm/react-liquid#readme): Liquid templating language component for React
|
|
53
|
+
|
|
54
|
+
## Financial Support
|
|
55
|
+
|
|
56
|
+
If you love LiquidJS or your company is using LiquidJS? Please consider [support us on Open Collective or Patreon][financial-support].
|
|
57
|
+
|
|
58
|
+
### Backers
|
|
59
|
+
If you personally like LiquidJS and find it useful to you, you can buy me a coffee!
|
|
60
|
+
|
|
61
|
+
<img src="https://opencollective.com/liquidjs/backers.svg?avatarHeight=72">
|
|
62
|
+
|
|
63
|
+
### Sponsors
|
|
64
|
+
If LiquidJS is benefiting your business/company, please sponsor us to contribute to our effort!
|
|
65
|
+
|
|
66
|
+
<img src="https://opencollective.com/liquidjs/sponsors.svg?avatarHeight=72">
|
|
67
|
+
## Contributors ✨
|
|
68
|
+
|
|
69
|
+
Want to contribute? see [Contribution Guidelines][contribution]. Thanks goes to these wonderful people:
|
|
70
|
+
|
|
71
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
72
|
+
<!-- prettier-ignore-start -->
|
|
73
|
+
<!-- markdownlint-disable -->
|
|
74
|
+
<table>
|
|
75
|
+
<tbody>
|
|
76
|
+
<tr>
|
|
77
|
+
<td align="center"><a href="https://harttle.land"><img src="https://avatars3.githubusercontent.com/u/4427974?v=4?s=100" width="100px;" alt="Jun Yang"/><br /><sub><b>Jun Yang</b></sub></a><br /><a href="#maintenance-harttle" title="Maintenance">🚧</a> <a href="https://github.com/harttle/liquidjs/commits?author=harttle" title="Code">💻</a></td>
|
|
78
|
+
<td align="center"><a href="https://github.com/chenos"><img src="https://avatars0.githubusercontent.com/u/2993310?v=4?s=100" width="100px;" alt="chenos"/><br /><sub><b>chenos</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=chenos" title="Code">💻</a></td>
|
|
79
|
+
<td align="center"><a href="https://zachleat.com/"><img src="https://avatars2.githubusercontent.com/u/39355?v=4?s=100" width="100px;" alt="Zach Leatherman"/><br /><sub><b>Zach Leatherman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/issues?q=author%3Azachleat" title="Bug reports">🐛</a></td>
|
|
80
|
+
<td align="center"><a href="https://github.com/thardy"><img src="https://avatars3.githubusercontent.com/u/120636?v=4?s=100" width="100px;" alt="Tim Hardy"/><br /><sub><b>Tim Hardy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thardy" title="Code">💻</a></td>
|
|
81
|
+
<td align="center"><a href="https://paulrobertlloyd.com/"><img src="https://avatars3.githubusercontent.com/u/813383?v=4?s=100" width="100px;" alt="Paul Robert Lloyd"/><br /><sub><b>Paul Robert Lloyd</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=paulrobertlloyd" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Apaulrobertlloyd" title="Bug reports">🐛</a></td>
|
|
82
|
+
<td align="center"><a href="https://twitter.com/alecdotbiz"><img src="https://avatars2.githubusercontent.com/u/1925840?v=4?s=100" width="100px;" alt="Alec Larson"/><br /><sub><b>Alec Larson</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=aleclarson" title="Code">💻</a></td>
|
|
83
|
+
<td align="center"><a href="https://github.com/pmalouin"><img src="https://avatars1.githubusercontent.com/u/1411117?v=4?s=100" width="100px;" alt="Patrick Malouin"/><br /><sub><b>Patrick Malouin</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Documentation">📖</a></td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<td align="center"><a href="https://jaswrks.com"><img src="https://avatars3.githubusercontent.com/u/1563559?v=4?s=100" width="100px;" alt="jaswrks"/><br /><sub><b>jaswrks</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jaswrks" title="Code">💻</a></td>
|
|
87
|
+
<td align="center"><a href="https://oott123.com"><img src="https://avatars2.githubusercontent.com/u/905663?v=4?s=100" width="100px;" alt="三三"/><br /><sub><b>三三</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=oott123" title="Code">💻</a> <a href="#ideas-oott123" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
88
|
+
<td align="center"><a href="https://github.com/ssendev"><img src="https://avatars0.githubusercontent.com/u/450793?v=4?s=100" width="100px;" alt="ssendev"/><br /><sub><b>ssendev</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Documentation">📖</a></td>
|
|
89
|
+
<td align="center"><a href="https://github.com/wojtask9"><img src="https://avatars3.githubusercontent.com/u/6099236?v=4?s=100" width="100px;" alt="wojtask9"/><br /><sub><b>wojtask9</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wojtask9" title="Code">💻</a></td>
|
|
90
|
+
<td align="center"><a href="https://github.com/thelornenelson"><img src="https://avatars3.githubusercontent.com/u/24596583?v=4?s=100" width="100px;" alt="Andrew Barclay"/><br /><sub><b>Andrew Barclay</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thelornenelson" title="Code">💻</a></td>
|
|
91
|
+
<td align="center"><a href="https://www.stam.pr/"><img src="https://avatars2.githubusercontent.com/u/142338?v=4?s=100" width="100px;" alt="Cory Mawhorter"/><br /><sub><b>Cory Mawhorter</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cmawhorter" title="Code">💻</a></td>
|
|
92
|
+
<td align="center"><a href="https://github.com/thehappybug"><img src="https://avatars0.githubusercontent.com/u/3393530?v=4?s=100" width="100px;" alt="Mehdi Jaffery"/><br /><sub><b>Mehdi Jaffery</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thehappybug" title="Code">💻</a></td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td align="center"><a href="https://github.com/robinbijlani"><img src="https://avatars0.githubusercontent.com/u/2503108?v=4?s=100" width="100px;" alt="Robin Bijlani"/><br /><sub><b>Robin Bijlani</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=robinbijlani" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Arobinbijlani" title="Bug reports">🐛</a></td>
|
|
96
|
+
<td align="center"><a href="https://www.rmkennedy.com"><img src="https://avatars3.githubusercontent.com/u/8356669?v=4?s=100" width="100px;" alt="Ryan Kennedy"/><br /><sub><b>Ryan Kennedy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ryaninvents" title="Code">💻</a></td>
|
|
97
|
+
<td align="center"><a href="https://github.com/strax"><img src="https://avatars2.githubusercontent.com/u/587213?v=4?s=100" width="100px;" alt="Sami Kukkonen"/><br /><sub><b>Sami Kukkonen</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=strax" title="Code">💻</a></td>
|
|
98
|
+
<td align="center"><a href="https://ScottFreeCode.github.io/"><img src="https://avatars3.githubusercontent.com/u/16506071?v=4?s=100" width="100px;" alt="Scott Santucci"/><br /><sub><b>Scott Santucci</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ScottFreeCode" title="Code">💻</a></td>
|
|
99
|
+
<td align="center"><a href="http://stevenrescigno.com"><img src="https://avatars3.githubusercontent.com/u/8505293?v=4?s=100" width="100px;" alt="Steven "/><br /><sub><b>Steven </b></sub></a><br /><a href="#example-stevenanthonyrevo" title="Examples">💡</a> <a href="https://github.com/harttle/liquidjs/commits?author=stevenanthonyrevo" title="Code">💻</a></td>
|
|
100
|
+
<td align="center"><a href="https://efcl.info/"><img src="https://avatars1.githubusercontent.com/u/19714?v=4?s=100" width="100px;" alt="azu"/><br /><sub><b>azu</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=azu" title="Documentation">📖</a></td>
|
|
101
|
+
<td align="center"><a href="https://github.com/wyozi"><img src="https://avatars3.githubusercontent.com/u/4894573?v=4?s=100" width="100px;" alt="Joonas"/><br /><sub><b>Joonas</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wyozi" title="Code">💻</a></td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td align="center"><a href="https://github.com/jamelait"><img src="https://avatars1.githubusercontent.com/u/14369255?v=4?s=100" width="100px;" alt="Jamel A."/><br /><sub><b>Jamel A.</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jamelait" title="Code">💻</a></td>
|
|
105
|
+
<td align="center"><a href="https://brandonpittman.net"><img src="https://avatars0.githubusercontent.com/u/967145?v=4?s=100" width="100px;" alt="Brandon Pittman"/><br /><sub><b>Brandon Pittman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=brandonpittman" title="Code">💻</a></td>
|
|
106
|
+
<td align="center"><a href="https://github.com/tgrandgent"><img src="https://avatars3.githubusercontent.com/u/17069042?v=4?s=100" width="100px;" alt="tgrandgent"/><br /><sub><b>tgrandgent</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tgrandgent" title="Code">💻</a></td>
|
|
107
|
+
<td align="center"><a href="https://github.com/mastodon0"><img src="https://avatars1.githubusercontent.com/u/7924332?v=4?s=100" width="100px;" alt="Martin Schuster"/><br /><sub><b>Martin Schuster</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mastodon0" title="Code">💻</a></td>
|
|
108
|
+
<td align="center"><a href="http://js.chenlei.me"><img src="https://avatars0.githubusercontent.com/u/6339390?v=4?s=100" width="100px;" alt="Ray"/><br /><sub><b>Ray</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Tests">⚠️</a> <a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Code">💻</a></td>
|
|
109
|
+
<td align="center"><a href="https://github.com/CriGoT"><img src="https://avatars0.githubusercontent.com/u/1936786?v=4?s=100" width="100px;" alt="Cristofer Gonzales"/><br /><sub><b>Cristofer Gonzales</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=CriGoT" title="Code">💻</a></td>
|
|
110
|
+
<td align="center"><a href="https://www.raymondcamden.com"><img src="https://avatars3.githubusercontent.com/u/393660?v=4?s=100" width="100px;" alt="Raymond Camden"/><br /><sub><b>Raymond Camden</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cfjedimaster" title="Documentation">📖</a></td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td align="center"><a href="https://stedman.dev"><img src="https://avatars1.githubusercontent.com/u/183122?v=4?s=100" width="100px;" alt="Steve Stedman"/><br /><sub><b>Steve Stedman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=stedman" title="Documentation">📖</a></td>
|
|
114
|
+
<td align="center"><a href="https://ciccarello.me"><img src="https://avatars0.githubusercontent.com/u/11273838?v=4?s=100" width="100px;" alt="Anthony Ciccarello"/><br /><sub><b>Anthony Ciccarello</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=aciccarello" title="Documentation">📖</a></td>
|
|
115
|
+
<td align="center"><a href="https://twitter.com/IAmTrySound"><img src="https://avatars0.githubusercontent.com/u/5635476?v=4?s=100" width="100px;" alt="Bogdan Chadkin"/><br /><sub><b>Bogdan Chadkin</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=TrySound" title="Code">💻</a></td>
|
|
116
|
+
<td align="center"><a href="https://hightouch.io"><img src="https://avatars0.githubusercontent.com/u/5959235?v=4?s=100" width="100px;" alt="Tejas Manohar"/><br /><sub><b>Tejas Manohar</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tejasmanohar" title="Code">💻</a></td>
|
|
117
|
+
<td align="center"><a href="http://about.me/peterdehaan"><img src="https://avatars2.githubusercontent.com/u/557895?v=4?s=100" width="100px;" alt="Peter deHaan"/><br /><sub><b>Peter deHaan</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=pdehaan" title="Documentation">📖</a></td>
|
|
118
|
+
<td align="center"><a href="https://github.com/amit777"><img src="https://avatars0.githubusercontent.com/u/2703309?v=4?s=100" width="100px;" alt="amit777"/><br /><sub><b>amit777</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=amit777" title="Code">💻</a> <a href="#financial-amit777" title="Financial">💵</a></td>
|
|
119
|
+
<td align="center"><a href="http://www.ifi.uzh.ch/en/ce/people/schuldenzucker.html"><img src="https://avatars3.githubusercontent.com/u/1100776?v=4?s=100" width="100px;" alt="Steffen Schuldenzucker"/><br /><sub><b>Steffen Schuldenzucker</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=sschuldenzucker" title="Code">💻</a></td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td align="center"><a href="https://github.com/Pixcell"><img src="https://avatars0.githubusercontent.com/u/4005291?v=4?s=100" width="100px;" alt="Pixcell"/><br /><sub><b>Pixcell</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=Pixcell" title="Code">💻</a></td>
|
|
123
|
+
<td align="center"><a href="https://jasonet.co"><img src="https://avatars.githubusercontent.com/u/10660468?v=4?s=100" width="100px;" alt="Jason Etcovitch"/><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=JasonEtco" title="Code">💻</a></td>
|
|
124
|
+
<td align="center"><a href="https://github.com/kayuapi"><img src="https://avatars.githubusercontent.com/u/10304328?v=4?s=100" width="100px;" alt="ZC"/><br /><sub><b>ZC</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=kayuapi" title="Documentation">📖</a></td>
|
|
125
|
+
<td align="center"><a href="https://memmie.lenglet.name"><img src="https://avatars.githubusercontent.com/u/729275?v=4?s=100" width="100px;" alt="Memmie Lenglet"/><br /><sub><b>Memmie Lenglet</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mems" title="Code">💻</a></td>
|
|
126
|
+
<td align="center"><a href="https://github.com/ilhamdev0"><img src="https://avatars.githubusercontent.com/u/57636145?v=4?s=100" width="100px;" alt="ilhamdev0"/><br /><sub><b>ilhamdev0</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ilhamdev0" title="Documentation">📖</a></td>
|
|
127
|
+
<td align="center"><a href="https://github.com/c412216887"><img src="https://avatars.githubusercontent.com/u/29691650?v=4?s=100" width="100px;" alt="一饮一啄皆是人生"/><br /><sub><b>一饮一啄皆是人生</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=c412216887" title="Documentation">📖</a></td>
|
|
128
|
+
<td align="center"><a href="https://digitalinspiration.com/"><img src="https://avatars.githubusercontent.com/u/1344071?v=4?s=100" width="100px;" alt="Amit Agarwal"/><br /><sub><b>Amit Agarwal</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=labnol" title="Documentation">📖</a></td>
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td align="center"><a href="https://n1ru4l.cloud/"><img src="https://avatars.githubusercontent.com/u/14338007?v=4?s=100" width="100px;" alt="Laurin Quast"/><br /><sub><b>Laurin Quast</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=n1ru4l" title="Code">💻</a></td>
|
|
132
|
+
<td align="center"><a href="https://github.com/mattvague"><img src="https://avatars.githubusercontent.com/u/64985?v=4?s=100" width="100px;" alt="Matt Vague"/><br /><sub><b>Matt Vague</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mattvague" title="Code">💻</a></td>
|
|
133
|
+
<td align="center"><a href="https://github.com/bglw"><img src="https://avatars.githubusercontent.com/u/40188355?v=4?s=100" width="100px;" alt="Liam Bigelow"/><br /><sub><b>Liam Bigelow</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=bglw" title="Code">💻</a></td>
|
|
134
|
+
<td align="center"><a href="https://about.me/jasonkurian"><img src="https://avatars.githubusercontent.com/u/2642545?v=4?s=100" width="100px;" alt="Jason Kurian"/><br /><sub><b>Jason Kurian</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=JaKXz" title="Documentation">📖</a></td>
|
|
135
|
+
<td align="center"><a href="https://github.com/dphm"><img src="https://avatars.githubusercontent.com/u/1707217?v=4?s=100" width="100px;" alt="d pham (they/them)"/><br /><sub><b>d pham (they/them)</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=dphm" title="Documentation">📖</a></td>
|
|
136
|
+
<td align="center"><a href="https://www.aleksandrhovhannisyan.com/"><img src="https://avatars.githubusercontent.com/u/19352442?v=4?s=100" width="100px;" alt="Aleksandr Hovhannisyan"/><br /><sub><b>Aleksandr Hovhannisyan</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=AleksandrHovhannisyan" title="Code">💻</a></td>
|
|
137
|
+
<td align="center"><a href="https://github.com/jg-rp"><img src="https://avatars.githubusercontent.com/u/72664870?v=4?s=100" width="100px;" alt="jg-rp"/><br /><sub><b>jg-rp</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jg-rp" title="Code">💻</a></td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td align="center"><a href="https://github.com/ameyaapte1"><img src="https://avatars.githubusercontent.com/u/16054747?v=4?s=100" width="100px;" alt="Ameya Apte"/><br /><sub><b>Ameya Apte</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ameyaapte1" title="Code">💻</a></td>
|
|
141
|
+
<td align="center"><a href="https://github.com/tbdrz"><img src="https://avatars.githubusercontent.com/u/50599116?v=4?s=100" width="100px;" alt="tbdrz"/><br /><sub><b>tbdrz</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tbdrz" title="Documentation">📖</a></td>
|
|
142
|
+
<td align="center"><a href="http://santialbo.com"><img src="https://avatars.githubusercontent.com/u/1557563?v=4?s=100" width="100px;" alt="Santi Albo"/><br /><sub><b>Santi Albo</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=santialbo" title="Documentation">📖</a></td>
|
|
143
|
+
<td align="center"><a href="https://github.com/YahangWu"><img src="https://avatars.githubusercontent.com/u/12295975?v=4?s=100" width="100px;" alt="Yahang Wu"/><br /><sub><b>Yahang Wu</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=YahangWu" title="Documentation">📖</a></td>
|
|
144
|
+
<td align="center"><a href="https://github.com/hongl-1"><img src="https://avatars.githubusercontent.com/u/101576612?v=4?s=100" width="100px;" alt="hongl"/><br /><sub><b>hongl</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=hongl-1" title="Documentation">📖</a></td>
|
|
145
|
+
<td align="center"><a href="https://github.com/zxx-457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4?s=100" width="100px;" alt="zxx-457"/><br /><sub><b>zxx-457</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=zxx-457" title="Documentation">📖</a></td>
|
|
146
|
+
</tr>
|
|
147
|
+
</tbody>
|
|
148
|
+
</table>
|
|
149
|
+
|
|
150
|
+
<!-- markdownlint-restore -->
|
|
151
|
+
<!-- prettier-ignore-end -->
|
|
152
|
+
|
|
153
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
154
|
+
|
|
155
|
+
[shopify/liquid]: https://shopify.github.io/liquid/
|
|
156
|
+
[plugins]: https://liquidjs.com/tutorials/plugins.html#Plugin-List
|
|
157
|
+
[setup]: https://liquidjs.com/tutorials/setup.html
|
|
158
|
+
[doc]: https://liquidjs.com
|
|
159
|
+
[github]: https://github.com/harttle/liquidjs
|
|
160
|
+
[patreon]: https://www.patreon.com/harttle
|
|
161
|
+
[oc]: https://opencollective.com/liquidjs/
|
|
162
|
+
[contribution]: https://liquidjs.com/tutorials/contribution-guidelines.html
|
|
163
|
+
[financial-support]: https://liquidjs.com/tutorials/contribution-guidelines.html#Financial-Support
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const Liquid = require('..').Liquid
|
|
4
|
+
const contextArg = process.argv.slice(2)[0]
|
|
5
|
+
let context = {}
|
|
6
|
+
|
|
7
|
+
if (contextArg) {
|
|
8
|
+
if (contextArg.endsWith('.json')) {
|
|
9
|
+
const fs = require('fs')
|
|
10
|
+
context = JSON.parse(fs.readFileSync(contextArg, 'utf8'))
|
|
11
|
+
} else {
|
|
12
|
+
context = JSON.parse(contextArg)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let tpl = ''
|
|
17
|
+
process.stdin.on('data', chunk => (tpl += chunk))
|
|
18
|
+
process.stdin.on('end', () => render(tpl))
|
|
19
|
+
|
|
20
|
+
async function render (tpl) {
|
|
21
|
+
const liquid = new Liquid()
|
|
22
|
+
const html = await liquid.parseAndRender(tpl, context)
|
|
23
|
+
process.stdout.write(html)
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterImpl } from '../../template/filter/filter-impl';
|
|
2
|
+
import { Scope } from '../../context/scope';
|
|
3
|
+
export declare const join: (v: any[], arg: string) => any;
|
|
4
|
+
export declare const last: (v: any) => any;
|
|
5
|
+
export declare const first: (v: any) => any;
|
|
6
|
+
export declare const reverse: (v: any[]) => any;
|
|
7
|
+
export declare function sort<T>(this: FilterImpl, arr: T[], property?: string): IterableIterator<unknown>;
|
|
8
|
+
export declare function sortNatural<T>(input: T[], property?: string): any[];
|
|
9
|
+
export declare const size: (v: string | any[]) => number;
|
|
10
|
+
export declare function map(this: FilterImpl, arr: Scope[], property: string): IterableIterator<unknown>;
|
|
11
|
+
export declare function compact<T>(this: FilterImpl, arr: T[]): any[];
|
|
12
|
+
export declare function concat<T1, T2>(v: T1[], arg?: T2[]): (T1 | T2)[];
|
|
13
|
+
export declare function slice<T>(v: T[] | string, begin: number, length?: number): T[] | string;
|
|
14
|
+
export declare function where<T extends object>(this: FilterImpl, arr: T[], property: string, expected?: any): IterableIterator<unknown>;
|
|
15
|
+
export declare function uniq<T>(arr: T[]): T[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const abs: (x: number) => any;
|
|
2
|
+
export declare const atLeast: (...args: number[]) => any;
|
|
3
|
+
export declare const atMost: (...args: number[]) => any;
|
|
4
|
+
export declare const ceil: (x: number) => any;
|
|
5
|
+
export declare const dividedBy: (dividend: number, divisor: number, integerArithmetic?: any) => any;
|
|
6
|
+
export declare const floor: (x: number) => any;
|
|
7
|
+
export declare const minus: (v: number, arg: number) => any;
|
|
8
|
+
export declare const modulo: (v: number, arg: number) => any;
|
|
9
|
+
export declare const times: (v: number, arg: number) => any;
|
|
10
|
+
export declare function round(v: number, arg?: number): number;
|
|
11
|
+
export declare function plus(v: number, arg: number): number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { identify } from '../../util/underscore';
|
|
2
|
+
import { FilterImpl } from '../../template/filter/filter-impl';
|
|
3
|
+
export declare function Default<T1 extends boolean, T2>(this: FilterImpl, value: T1, defaultValue: T2, ...args: Array<[string, any]>): T1 | T2;
|
|
4
|
+
export declare function json(value: any): string;
|
|
5
|
+
export declare const raw: typeof identify;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function append(v: string, arg: string): string;
|
|
2
|
+
export declare function prepend(v: string, arg: string): string;
|
|
3
|
+
export declare function lstrip(v: string, chars?: string): string;
|
|
4
|
+
export declare function downcase(v: string): string;
|
|
5
|
+
export declare function upcase(str: string): string;
|
|
6
|
+
export declare function remove(v: string, arg: string): string;
|
|
7
|
+
export declare function removeFirst(v: string, l: string): string;
|
|
8
|
+
export declare function rstrip(str: string, chars?: string): string;
|
|
9
|
+
export declare function split(v: string, arg: string): string[];
|
|
10
|
+
export declare function strip(v: string, chars?: string): string;
|
|
11
|
+
export declare function stripNewlines(v: string): string;
|
|
12
|
+
export declare function capitalize(str: string): string;
|
|
13
|
+
export declare function replace(v: string, pattern: string, replacement: string): string;
|
|
14
|
+
export declare function replaceFirst(v: string, arg1: string, arg2: string): string;
|
|
15
|
+
export declare function truncate(v: string, l?: number, o?: string): string;
|
|
16
|
+
export declare function truncatewords(v: string, words?: number, o?: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockDrop } from '../../drop/block-drop';
|
|
2
|
+
import { TagToken, TopLevelToken, Context, TagImpl, Emitter } from '../../types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
parse(this: TagImpl, token: TagToken, remainTokens: TopLevelToken[]): void;
|
|
5
|
+
render(this: TagImpl, ctx: Context, emitter: Emitter): Generator<any, void, unknown>;
|
|
6
|
+
getBlockRender(this: TagImpl, ctx: Context): (superBlock: BlockDrop, emitter: Emitter) => any;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Liquid } from '../../liquid';
|
|
2
|
+
import { Token, Template, Tokenizer, Context, TagImplOptions } from '../../types';
|
|
3
|
+
declare const _default: TagImplOptions;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare type ParsedFileName = Template[] | Token | string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* @return null for "none",
|
|
8
|
+
* @return Template[] for quoted with tags and/or filters
|
|
9
|
+
* @return Token for expression (not quoted)
|
|
10
|
+
* @throws TypeError if cannot read next token
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName | null;
|
|
13
|
+
export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Template } from '../template/template';
|
|
2
|
+
export interface Cache<T> {
|
|
3
|
+
write(key: string, value: T): void | Promise<void>;
|
|
4
|
+
read(key: string): T | undefined | Promise<T | undefined>;
|
|
5
|
+
remove(key: string): void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare type LiquidCache = Cache<Template[] | Promise<Template[]>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Cache } from './cache';
|
|
2
|
+
export declare class LRU<T> implements Cache<T> {
|
|
3
|
+
limit: number;
|
|
4
|
+
size: number;
|
|
5
|
+
private cache;
|
|
6
|
+
private head;
|
|
7
|
+
private tail;
|
|
8
|
+
constructor(limit: number, size?: number);
|
|
9
|
+
write(key: string, value: T): void;
|
|
10
|
+
read(key: string): T | undefined;
|
|
11
|
+
remove(key: string): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
private ensureLimit;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NormalizedFullOptions, RenderOptions } from '../liquid-options';
|
|
2
|
+
import { Scope } from './scope';
|
|
3
|
+
declare type PropertyKey = string | number;
|
|
4
|
+
export declare class Context {
|
|
5
|
+
/**
|
|
6
|
+
* insert a Context-level empty scope,
|
|
7
|
+
* for tags like `{% capture %}` `{% assign %}` to operate
|
|
8
|
+
*/
|
|
9
|
+
private scopes;
|
|
10
|
+
private registers;
|
|
11
|
+
/**
|
|
12
|
+
* user passed in scope
|
|
13
|
+
* `{% increment %}`, `{% decrement %}` changes this scope,
|
|
14
|
+
* whereas `{% capture %}`, `{% assign %}` only hide this scope
|
|
15
|
+
*/
|
|
16
|
+
environments: Scope;
|
|
17
|
+
/**
|
|
18
|
+
* global scope used as fallback for missing variables
|
|
19
|
+
*/
|
|
20
|
+
globals: Scope;
|
|
21
|
+
sync: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The normalized liquid options object
|
|
24
|
+
*/
|
|
25
|
+
opts: NormalizedFullOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Throw when accessing undefined variable?
|
|
28
|
+
*/
|
|
29
|
+
strictVariables: boolean;
|
|
30
|
+
constructor(env?: object, opts?: NormalizedFullOptions, renderOptions?: RenderOptions);
|
|
31
|
+
getRegister(key: string): any;
|
|
32
|
+
setRegister(key: string, value: any): any;
|
|
33
|
+
saveRegister(...keys: string[]): [string, any][];
|
|
34
|
+
restoreRegister(keyValues: [string, any][]): void;
|
|
35
|
+
getAll(): Scope;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated use `_get()` instead
|
|
38
|
+
*/
|
|
39
|
+
get(paths: PropertyKey[]): unknown;
|
|
40
|
+
_get(paths: PropertyKey[]): IterableIterator<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated use `_get()` instead
|
|
43
|
+
*/
|
|
44
|
+
getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
|
|
45
|
+
_getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
|
|
46
|
+
push(ctx: object): number;
|
|
47
|
+
pop(): Scope | undefined;
|
|
48
|
+
bottom(): Scope;
|
|
49
|
+
private findScope;
|
|
50
|
+
}
|
|
51
|
+
export declare function readProperty(obj: Scope, key: PropertyKey, ownPropertyOnly: boolean): any;
|
|
52
|
+
export declare function readJSProperty(obj: Scope, key: PropertyKey, ownPropertyOnly: boolean): any;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Drop } from './drop';
|
|
2
|
+
export declare class BlockDrop extends Drop {
|
|
3
|
+
private superBlockRender;
|
|
4
|
+
constructor(superBlockRender?: () => Iterable<any>);
|
|
5
|
+
/**
|
|
6
|
+
* Provide parent access in child block by
|
|
7
|
+
* {{ block.super }}
|
|
8
|
+
*/
|
|
9
|
+
super(): Iterable<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Drop } from './drop';
|
|
2
|
+
import { Comparable } from './comparable';
|
|
3
|
+
export declare class EmptyDrop extends Drop implements Comparable {
|
|
4
|
+
equals(value: any): boolean;
|
|
5
|
+
gt(): boolean;
|
|
6
|
+
geq(): boolean;
|
|
7
|
+
lt(): boolean;
|
|
8
|
+
leq(): boolean;
|
|
9
|
+
valueOf(): string;
|
|
10
|
+
}
|