Skip to content

Commit 3254289

Browse files
authored
Merge branch 'main' into main
2 parents c26a8e5 + 1695bcb commit 3254289

File tree

22 files changed

+640
-0
lines changed

22 files changed

+640
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,9 @@
13861386
[submodule "vendor/grammars/vscode-go"]
13871387
path = vendor/grammars/vscode-go
13881388
url = https://github.com/golang/vscode-go
1389+
[submodule "vendor/grammars/vscode-go-template"]
1390+
path = vendor/grammars/vscode-go-template
1391+
url = https://github.com/jinliming2/vscode-go-template.git
13891392
[submodule "vendor/grammars/vscode-hack"]
13901393
path = vendor/grammars/vscode-hack
13911394
url = https://github.com/slackhq/vscode-hack

grammars.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,12 @@ vendor/grammars/vscode-gleam:
12301230
vendor/grammars/vscode-go:
12311231
- go.mod
12321232
- go.sum
1233+
vendor/grammars/vscode-go-template:
1234+
- source.go-template
1235+
- source.go.injection.double.go-template
1236+
- source.go.injection.raw.go-template
1237+
- text.injection.go-template
1238+
- text.markdown.go-template.codeblock
12331239
vendor/grammars/vscode-hack:
12341240
- markdown.hack.codeblock
12351241
- source.hack

lib/linguist/generated.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def generated?
7575
esy_lock? ||
7676
npm_shrinkwrap_or_package_lock? ||
7777
pnpm_lock? ||
78+
bun_lock? ||
7879
terraform_lock? ||
7980
generated_yarn_plugnplay? ||
8081
godeps? ||
@@ -503,6 +504,13 @@ def pnpm_lock?
503504
!!name.match(/pnpm-lock\.yaml/)
504505
end
505506

507+
# Internal: Is the blob a generated bun lockfile?
508+
#
509+
# Returns true or false.
510+
def bun_lock?
511+
!!name.match(/(?:^|\/)bun\.lockb?$/)
512+
end
513+
506514
# Internal: Is the blob a generated Yarn Plug'n'Play?
507515
#
508516
# Returns true or false.

lib/linguist/heuristics.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ disambiguations:
139139
and:
140140
- pattern: '(?i)^[ \t]*return '
141141
- negative_pattern: '(?i)[ \t]*gosub '
142+
- language: QuickBASIC
143+
named_pattern: quickbasic
142144
- extensions: ['.bs']
143145
rules:
144146
- language: Bikeshed
@@ -870,6 +872,12 @@ disambiguations:
870872
pattern: '^## |@no-lib-strip@'
871873
- language: TeX
872874
pattern: '^\\(contentsline|defcounter|beamer|boolfalse)'
875+
- extensions: ['.tpl']
876+
rules:
877+
- language: Go Template
878+
pattern: '\{\{-?\s*(\`?\"\\?\"?|\/\*\s|\w*)\b'
879+
- language: Smarty
880+
pattern: '(?<!\{)\{(\*\s|\$|\/)?\w*\b'
873881
- extensions: ['.ts']
874882
rules:
875883
- language: XML

lib/linguist/languages.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,6 +2736,22 @@ Go Module:
27362736
tm_scope: go.mod
27372737
ace_mode: text
27382738
language_id: 947461016
2739+
Go Template:
2740+
type: markup
2741+
color: "#00ADD8"
2742+
aliases:
2743+
- gotmpl
2744+
extensions:
2745+
- ".gohtml"
2746+
- ".gotmpl"
2747+
- ".html.tmpl"
2748+
- ".tmpl"
2749+
- ".tpl"
2750+
filenames:
2751+
- _helpers.tpl
2752+
tm_scope: source.go-template
2753+
ace_mode: text
2754+
language_id: 247918769
27392755
Go Workspace:
27402756
type: data
27412757
color: "#00ADD8"
@@ -3502,6 +3518,7 @@ JSON with Comments:
35023518
- ".sublime-workspace"
35033519
- ".sublime_metrics"
35043520
- ".sublime_session"
3521+
- ".tsconfig.json"
35053522
filenames:
35063523
- ".babelrc"
35073524
- ".devcontainer.json"
@@ -4274,6 +4291,7 @@ Lua:
42744291
- ".luacheckrc"
42754292
interpreters:
42764293
- lua
4294+
- luajit
42774295
language_id: 213
42784296
Luau:
42794297
type: programming
@@ -5713,6 +5731,7 @@ Pip Requirements:
57135731
type: data
57145732
color: "#FFD343"
57155733
filenames:
5734+
- dev-requirements.txt
57165735
- requirements-dev.txt
57175736
- requirements.lock.txt
57185737
- requirements.txt
@@ -6131,6 +6150,7 @@ QuickBASIC:
61316150
color: "#008080"
61326151
extensions:
61336152
- ".bas"
6153+
- ".bi"
61346154
tm_scope: source.QB64
61356155
aliases:
61366156
- qb

samples/Go Template/_helpers.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{- /* Generate basic labels */ -}}
2+
{{- define "mychart.labels" }}
3+
labels:
4+
generator: helm
5+
date: {{ now | htmlDate }}
6+
chart: {{ .Chart.Name }}
7+
version: {{ .Chart.Version }}
8+
{{- end }}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{{- /* https://github.com/redhat-cop/helm-charts/blob/main/_templates.gotmpl */ -}}
2+
3+
{{ define "doc.header" -}}
4+
5+
{{ template "chart.header" . }}
6+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7+
8+
{{ template "chart.versionBadge" . }}
9+
10+
{{ template "chart.deprecationWarning" . }}
11+
12+
## Description
13+
14+
{{ template "chart.description" . }}
15+
16+
{{- end }}
17+
18+
{{ define "doc.maintainer_and_sources" -}}
19+
20+
{{ template "chart.maintainersSection" . }}
21+
22+
## Sources
23+
Source: {{ template "chart.sourcesList" . }}
24+
25+
Source code: {{ template "chart.homepage" . }}
26+
27+
{{- end }}
28+
29+
30+
{{ define "doc.deps" -}}
31+
32+
## Dependencies
33+
34+
This chart has the following dependencies:
35+
36+
{{ template "chart.requirementsTable" . }}
37+
38+
{{- end }}
39+
40+
{{ define "doc.values" -}}
41+
42+
{{ template "chart.valuesSection" . }}
43+
44+
{{- end }}
45+
46+
47+
{{ define "doc.footer" -}}
48+
49+
## Installing the Chart
50+
51+
To install the chart with the release name `my-release`:
52+
53+
```console
54+
helm install my-release repo/<chart-name>>
55+
```
56+
57+
The command deploys the chart on the Kubernetes cluster in the default configuration.
58+
59+
## Uninstalling the Chart
60+
61+
To uninstall/delete the my-release deployment:
62+
63+
```console
64+
helm delete my-release
65+
```
66+
67+
The command removes all the Kubernetes components associated with the chart and deletes the release.
68+
69+
{{ template "helm-docs.versionFooter" . }}
70+
71+
{{- end }}

samples/Go Template/base.tpl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{ /* Example from https://github.com/go-echarts/go-echarts/blob/master/templates/base.tpl */ }}
2+
{{- define "base_element" -}}
3+
<div class="container">
4+
<div class="item" id="{{ .ChartID }}" style="width:{{ .Initialization.Width }};height:{{ .Initialization.Height }};"></div>
5+
</div>
6+
{{- end -}}
7+
8+
{{- define "base_script" -}}
9+
<script type="text/javascript">
10+
"use strict";
11+
let goecharts_{{ .ChartID | safeJS }} = echarts.init(document.getElementById('{{ .ChartID | safeJS }}'), "{{ .Theme }}", { renderer: "{{ .Initialization.Renderer }}" });
12+
let option_{{ .ChartID | safeJS }} = {{ template "base_option" . }}
13+
goecharts_{{ .ChartID | safeJS }}.setOption(option_{{ .ChartID | safeJS }});
14+
15+
{{- range $listener := .EventListeners }}
16+
{{if .Query }}
17+
goecharts_{{ $.ChartID | safeJS }}.on({{ $listener.EventName }}, {{ $listener.Query | safeJS }}, {{ injectInstance $listener.Handler "%MY_ECHARTS%" $.ChartID | safeJS }});
18+
{{ else }}
19+
goecharts_{{ $.ChartID | safeJS }}.on({{ $listener.EventName }}, {{ injectInstance $listener.Handler "%MY_ECHARTS%" $.ChartID | safeJS }})
20+
{{ end }}
21+
{{- end }}
22+
23+
{{- range .JSFunctions.Fns }}
24+
{{ injectInstance . "%MY_ECHARTS%" $.ChartID | safeJS }}
25+
{{- end }}
26+
</script>
27+
{{- end -}}
28+
29+
{{- define "base_option" }}
30+
{{- .JSONNotEscaped | safeJS }}
31+
{{- end }};
32+
33+
{{- define "base" }}
34+
{{- template "base_element" . }}
35+
{{- template "base_script" . }}
36+
{{- end }}

samples/Go Template/batch.gohtml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{{- /* https://github.com/ncruces/RethinkRAW/blob/master/assets/batch.gohtml */ -}}
2+
<!doctype html>
3+
<html lang=en>
4+
5+
<head>
6+
<meta charset="utf-8">
7+
<title>RethinkRAW: Batch processing {{len .Photos}} photos</title>
8+
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
9+
<link rel="shortcut icon" href="/favicon.ico">
10+
<link rel="stylesheet" href="/main.css">
11+
<link rel="stylesheet" href="/batch.css">
12+
<link rel="stylesheet" href="/raw-editor.css">
13+
<link rel="stylesheet" href="/dialog-polyfill.css">
14+
<link rel="preload" as="style" href="/normalize.css">
15+
<link rel="preload" as="style" href="/fontawesome.css">
16+
<link rel="preload" as="font" type="font/woff2" crossorigin href="/fa-solid-900.woff2">
17+
<script src="/dialog-polyfill.js" defer></script>
18+
<script src="/main.js" defer></script>
19+
<script src="/batch.js" defer></script>
20+
<script src="/raw-editor.js" defer></script>
21+
<noscript><meta http-equiv="refresh" content="0;url=/browser.html"></noscript>
22+
</head>
23+
24+
<body>
25+
{{- template "raw-editor.gohtml" "hidden"}}
26+
27+
<div id=menu-sticker>
28+
<div id=menu>
29+
<div class="toolbar">
30+
<button type=button title="Go back" class="minimal-ui" onclick="back()"><i class="fas fa-arrow-left"></i></button>
31+
<button type=button title="Reload photos" class="minimal-ui" onclick="location.reload()"><i class="fas fa-sync"></i></button>
32+
<button type=button title="S̲ave changes" accesskey="s" onclick="saveFile()" id=save disabled><i class="fas fa-save"></i></button>
33+
{{- if .Export}}
34+
<button type=button title="Ex̲port JPEGs (⌥-click for options)" accesskey="x" class="alt-off" onclick="exportFile()"><i class="fas fa-file-image"></i></button>
35+
<button type=button title="Export…" class="alt-on" onclick="exportFile('dialog')"><i class="fas fa-file-download"></i></button>
36+
{{- end}}
37+
<button type=button title="Edit photos…" onclick="toggleEdit()" id=edit><i class="fas fa-sliders-h"></i></button>
38+
</div>
39+
</div>
40+
</div>
41+
<div id=gallery>
42+
{{- range .Photos}}
43+
<a href="/photo/{{.Path}}" onclick="return popup(this, event)">
44+
<img loading=lazy title="{{.Name}}" alt="{{.Name}}" src="/thumb/{{.Path}}" onerror="parentNode.hidden=true">
45+
</a>
46+
{{- else}}
47+
<span>No RAW photos here.</span>
48+
{{- end}}
49+
</div>
50+
51+
<dialog id=progress-dialog>
52+
Lorem ipsum<br>
53+
<progress></progress>
54+
</dialog>
55+
</body>
56+
57+
</html>

0 commit comments

Comments
 (0)