janja-language-server 0.1.5 → 0.1.6
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/dist/service.js +5 -5
- package/package.json +2 -2
package/dist/service.js
CHANGED
|
@@ -11,7 +11,7 @@ const directives = [
|
|
|
11
11
|
['break', 'break'],
|
|
12
12
|
['continue', 'continue'],
|
|
13
13
|
['set', 'set ${1:name} = ${2:value}'],
|
|
14
|
-
['include', 'include "${1:path}"'],
|
|
14
|
+
['include', 'include "${1:path}"$0'],
|
|
15
15
|
['block', 'block ${1:name} }}$0{{ endblock'],
|
|
16
16
|
['endblock', 'endblock'],
|
|
17
17
|
['super', 'super'],
|
|
@@ -24,7 +24,7 @@ const directives = [
|
|
|
24
24
|
['endcapture', 'endcapture'],
|
|
25
25
|
['with', 'with ${1:value} }}$0{{ endwith'],
|
|
26
26
|
['endwith', 'endwith'],
|
|
27
|
-
['stylesheet', 'stylesheet }}$0{{ endstylesheet'],
|
|
27
|
+
['stylesheet', 'stylesheet }}\n<style>\n$0\n</style>\n{{ endstylesheet'],
|
|
28
28
|
['endstylesheet', 'endstylesheet'],
|
|
29
29
|
['stylesheets', 'stylesheets'],
|
|
30
30
|
].map(([label, snippet]) => ({ label, kind: 'directive', snippet }));
|
|
@@ -109,15 +109,15 @@ const directiveDocs = {
|
|
|
109
109
|
if: '`{{ if test }}...{{ elif test }}...{{ else }}...{{ endif }}`\n\nRenders the first branch whose test is truthy.',
|
|
110
110
|
for: '`{{ for item of items }}...{{ else }}...{{ endfor }}`\n\nIterates arrays, strings and other iterables. `loop.index`, `loop.first` and `loop.last` are available in the body; `else` renders when there is nothing to iterate.',
|
|
111
111
|
set: '`{{ set name = expression }}`\n\nAssigns in the current scope. `{{ set (a, b) = value }}` reads properties.',
|
|
112
|
-
include: '`{{ include
|
|
112
|
+
include: '`{{ include path }}` / `{{ include path with expr }}`\n\nRenders another template in place. `path` may be a string literal or any expression; dynamic paths need `preloadIncludes`.',
|
|
113
113
|
block: '`{{ block name }}...{{ endblock }}`\n\nA replaceable region. The last definition of a name is rendered where the block first appears; `{{ super }}` renders the definition it replaced.',
|
|
114
114
|
macro: '`{{ macro name(param, other = default) }}...{{ endmacro }}`\n\nA reusable piece of template, invoked with `{{ call name(args) }}...{{ endcall }}`. `{{ caller }}` renders the body of the call.',
|
|
115
115
|
call: '`{{ call name(args) }}...{{ endcall }}`\n\nInvokes a macro; the body is rendered where the macro has `{{ caller }}`.',
|
|
116
116
|
capture: '`{{ capture name }}...{{ endcapture }}`\n\nRenders the body into a variable instead of the output.',
|
|
117
117
|
with: '`{{ with value }}...{{ endwith }}`\n\nRenders the body in a scope made of the properties of `value` only.',
|
|
118
|
-
stylesheet: '`{{ stylesheet }}...{{ endstylesheet }}`\n\nCo-locates
|
|
118
|
+
stylesheet: '`{{ stylesheet }}...{{ endstylesheet }}`\n\nCo-locates styles with a section or snippet (Shopify `{% stylesheet %}`). Put a `<style>` in the body for native IDE CSS highlighting. Collected at compile time; writes nothing where it appears.',
|
|
119
119
|
endstylesheet: '`{{ endstylesheet }}`\n\nCloses a `stylesheet` block.',
|
|
120
|
-
stylesheets: '`{{ stylesheets }}`\n\
|
|
120
|
+
stylesheets: '`{{ stylesheets }}`\n\nConcatenates every collected stylesheet body as-is (no extra `<style>` wrap). Place in the layout `<head>`; only the first occurrence runs.',
|
|
121
121
|
break: '`{{ break }}`\n\nEnds the innermost loop.',
|
|
122
122
|
continue: '`{{ continue }}`\n\nSkips to the next iteration of the innermost loop.',
|
|
123
123
|
super: '`{{ super }}`\n\nInside a block, renders the definition this block replaced.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "janja-language-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Language server for Janja templates: diagnostics, completions and formatting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"janja": "^4.
|
|
43
|
+
"janja": "^4.4.0",
|
|
44
44
|
"vscode-languageserver": "^10.1.2",
|
|
45
45
|
"vscode-languageserver-textdocument": "^1.0.15"
|
|
46
46
|
},
|