Skip to content

Commit 6f8950f

Browse files
committed
chore: initial commit
0 parents  commit 6f8950f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+8891
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
content/api/**/*
3+
.vitepress/dist
4+
5+
yarn.lock
6+
.DS_Store

.vitepress/config.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineConfig } from "vitepress";
2+
import sidebar from "../content/sidebar";
3+
// https://mysticmind.dev/vitepress-fenced-code-block-syntax-highlighting-quirks-with-net-or-other-languages
4+
import { BUNDLED_LANGUAGES } from "shiki";
5+
import cliLanguageGrammar from "./shiki/cli.tmLanguage.json";
6+
7+
BUNDLED_LANGUAGES.push({
8+
id: "cli",
9+
scopeName: "source.cli",
10+
// @ts-ignore
11+
grammar: cliLanguageGrammar,
12+
});
13+
14+
export default defineConfig({
15+
srcDir: "./content",
16+
lang: "en-US",
17+
title: "NativeScript",
18+
description: "NativeScript docs",
19+
ignoreDeadLinks: true,
20+
cleanUrls: "without-subfolders",
21+
lastUpdated: true,
22+
appearance: false,
23+
themeConfig: {
24+
editLink: {
25+
pattern: "https://pr.new/github.com/NativeScript/docs/edit/main/:path",
26+
// "https://pr.new/github.com/NativeScript/docs/edit/main/:filePath?initialPath=:path",
27+
},
28+
sidebar,
29+
},
30+
});

.vitepress/shiki/cli.theme.json

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"name": "CLI Theme",
3+
"fg": "#f3f4f6",
4+
"bg": "#111827",
5+
"type": "dark",
6+
"colors": {
7+
"editor.foreground": "#d1d5db",
8+
"editor.background": "#111827"
9+
},
10+
"settings": [
11+
{
12+
"name": "CLI Command Punctuation",
13+
"scope": ["punctuation.cli"],
14+
"settings": {
15+
"foreground": "#9ca3af"
16+
}
17+
},
18+
{
19+
"name": "CLI Command Name",
20+
"scope": ["keyword.command-name.cli"],
21+
"settings": {
22+
"foreground": "#f472b6"
23+
}
24+
},
25+
{
26+
"name": "CLI Command Arg",
27+
"scope": ["keyword.command-arg.cli"],
28+
"settings": {
29+
"foreground": "#a3e635"
30+
}
31+
},
32+
{
33+
"name": "CLI Double-Dash Flag",
34+
"scope": ["flag.double-dash.cli"],
35+
"settings": {
36+
"foreground": "#22d3ee"
37+
}
38+
},
39+
{
40+
"name": "CLI Single-Dash Flag",
41+
"scope": ["flag.single-dash.cli"],
42+
"settings": {
43+
"foreground": "#67e8f9",
44+
"fontStyle": "underline"
45+
}
46+
},
47+
{
48+
"name": "CLI Assignment",
49+
"scope": ["keyword.operator.assignment.cli"],
50+
"settings": {
51+
"foreground": "#c4b5fd"
52+
}
53+
},
54+
{
55+
"name": "CLI String",
56+
"scope": ["string.cli"],
57+
"settings": {
58+
"foreground": "#fb7185"
59+
}
60+
},
61+
{
62+
"name": "CLI Single-Line Comment",
63+
"scope": ["comment.line.double-slash.cli"],
64+
"settings": {
65+
"foreground": "#6b7280"
66+
}
67+
},
68+
{
69+
"name": "CLI Placeholder",
70+
"scope": ["placeholder.cli"],
71+
"settings": {
72+
"foreground": "#34d399",
73+
"fontStyle": "underline"
74+
}
75+
},
76+
{
77+
"name": "CLI Interpolation",
78+
"scope": ["interpolation.begin.cli", "interpolation.end.cli"],
79+
"settings": {
80+
"foreground": "#65a30d"
81+
}
82+
},
83+
{
84+
"name": "CLI Operators",
85+
"scope": ["operators.cli"],
86+
"settings": {
87+
"foreground": "#14b8a6"
88+
}
89+
},
90+
{
91+
"name": "CLI Output",
92+
"scope": ["output.begin.cli", "output.end.cli"],
93+
"settings": {
94+
"foreground": "#000001"
95+
}
96+
}
97+
]
98+
}

.vitepress/shiki/cli.tmLanguage.json

+259
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "CLI",
4+
"scopeName": "source.cli",
5+
"fileTypes": [".cli"],
6+
"patterns": [
7+
{
8+
"include": "#output"
9+
},
10+
{
11+
"include": "#comments"
12+
},
13+
{
14+
"include": "#commands"
15+
},
16+
{
17+
"include": "#strings"
18+
},
19+
{
20+
"include": "#placeholder"
21+
},
22+
{
23+
"include": "#interpolation"
24+
},
25+
{
26+
"include": "#operators"
27+
}
28+
],
29+
"repository": {
30+
"$self": {},
31+
"commandArgs": {
32+
"name": "keyword.command-arg.cli",
33+
"match": "[\\./~@]*\\b[\\w\\/:\\\\-]+\\b/?"
34+
},
35+
"commandName": {
36+
"patterns": [
37+
{
38+
"include": "#commandNameStart"
39+
},
40+
{
41+
"include": "#commandNameInterpolation"
42+
},
43+
{
44+
"include": "#commandNameAfterShellPrefix"
45+
},
46+
{
47+
"include": "#commandNameAfterOperator"
48+
}
49+
]
50+
},
51+
"commandNameAfterOperator": {
52+
"name": "meta.commandNameAfterOperator.cli",
53+
"match": "(?<=([\\&|])\\s)(\\S+)",
54+
"captures": {
55+
"2": {
56+
"name": "keyword.command-name.cli"
57+
}
58+
}
59+
},
60+
"commandNameAfterShellPrefix": {
61+
"name": "keyword.command-name.cli",
62+
"match": "^(\\$)\\s(\\S)+",
63+
"captures": {
64+
"1": {
65+
"name": "punctuation.cli"
66+
}
67+
}
68+
},
69+
"commandNameInterpolation": {
70+
"name": "keyword.command-name.cli",
71+
"match": "\\b(?<=\\$\\()\\S+\\b"
72+
},
73+
"commandNameStart": {
74+
"name": "keyword.command-name.cli",
75+
"match": "^([^$\\s])+"
76+
},
77+
"commands": {
78+
"patterns": [
79+
{
80+
"include": "#commandName"
81+
},
82+
{
83+
"include": "#commandArgs"
84+
},
85+
{
86+
"include": "#flags"
87+
}
88+
]
89+
},
90+
"comments": {
91+
"patterns": [
92+
{
93+
"include": "#line-comment"
94+
}
95+
]
96+
},
97+
"doubleDashFlag": {
98+
"name": "flag.double-dash.cli",
99+
"match": "\\s(--)([\\w\\-\\_\\.]+)(=([^\\s\\(\\)]+))?",
100+
"captures": {
101+
"1": {
102+
"name": "punctuation.cli"
103+
},
104+
"2": {
105+
"patterns": [
106+
{
107+
"include": "#flagDot"
108+
}
109+
]
110+
},
111+
"3": {
112+
"name": "keyword.operator.assignment.cli"
113+
},
114+
"4": {
115+
"name": "string.cli",
116+
"patterns": [
117+
{
118+
"include": "#strings"
119+
}
120+
]
121+
}
122+
}
123+
},
124+
"doubleQuoteString": {
125+
"name": "string.cli",
126+
"begin": "\"",
127+
"end": "\"",
128+
"beginCaptures": {
129+
"0": {
130+
"name": "punctuation.cli"
131+
}
132+
},
133+
"endCaptures": {
134+
"0": {
135+
"name": "punctuation.cli"
136+
}
137+
}
138+
},
139+
"flagDot": {
140+
"name": "punctuation.cli",
141+
"match": "\\."
142+
},
143+
"flags": {
144+
"patterns": [
145+
{
146+
"include": "#doubleDashFlag"
147+
},
148+
{
149+
"include": "#singleDashFlag"
150+
}
151+
]
152+
},
153+
"interpolation": {
154+
"name": "meta.interpolation.cli",
155+
"begin": "\\$\\(",
156+
"end": "\\)\\s",
157+
"beginCaptures": {
158+
"0": {
159+
"name": "interpolation.begin.cli"
160+
}
161+
},
162+
"endCaptures": {
163+
"0": {
164+
"name": "interpolation.end.cli"
165+
}
166+
},
167+
"patterns": [
168+
{
169+
"include": "#$self"
170+
}
171+
]
172+
},
173+
"line-comment": {
174+
"name": "comment.line.double-slash.cli",
175+
"match": "(#|//).*(?=$)"
176+
},
177+
"operators": {
178+
"name": "operators.cli",
179+
"match": "\\s[>|\\\\&]+\\s"
180+
},
181+
"output": {
182+
"name": "string.cli",
183+
"begin": "^(\\$<<<)",
184+
"end": "^(>>>\\$)",
185+
"beginCaptures": {
186+
"0": {
187+
"name": "output.begin.cli"
188+
}
189+
},
190+
"endCaptures": {
191+
"0": {
192+
"name": "output.end.cli"
193+
}
194+
},
195+
"patterns": [
196+
{
197+
"include": "#source.json"
198+
}
199+
]
200+
},
201+
"placeholder": {
202+
"name": "placeholder.cli",
203+
"begin": "<",
204+
"end": ">",
205+
"beginCaptures": {
206+
"0": {
207+
"name": "punctuation.cli"
208+
}
209+
},
210+
"endCaptures": {
211+
"0": {
212+
"name": "punctuation.cli"
213+
}
214+
}
215+
},
216+
"singleDashFlag": {
217+
"name": "flag.single-dash.cli",
218+
"match": "\\s(-)([\\w\\-\\_\\.]+)",
219+
"captures": {
220+
"1": {
221+
"name": "punctuation.cli"
222+
},
223+
"2": {
224+
"patterns": [
225+
{
226+
"include": "#flagDot"
227+
}
228+
]
229+
}
230+
}
231+
},
232+
"singleQuoteString": {
233+
"name": "string.cli",
234+
"begin": "'",
235+
"end": "'",
236+
"beginCaptures": {
237+
"0": {
238+
"name": "punctuation.cli"
239+
}
240+
},
241+
"endCaptures": {
242+
"0": {
243+
"name": "punctuation.cli"
244+
}
245+
}
246+
},
247+
"source.json": {},
248+
"strings": {
249+
"patterns": [
250+
{
251+
"include": "#singleQuoteString"
252+
},
253+
{
254+
"include": "#doubleQuoteString"
255+
}
256+
]
257+
}
258+
}
259+
}

0 commit comments

Comments
 (0)