Skip to content

Commit acee867

Browse files
committed
chore: format all documents
Signed-off-by: peefy <[email protected]>
1 parent 69f23bc commit acee867

File tree

14 files changed

+84
-78
lines changed

14 files changed

+84
-78
lines changed

blog/2024-04-17-newsletter/index.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ cargo add --git https://github.com/kcl-lang/lib
6666

6767
- The initial release of the KCL Node.js SDK. Repository link: [https://github.com/kcl-lang/lib/tree/main/nodejs](https://github.com/kcl-lang/lib/tree/main/nodejs). Contributions are welcome.
6868

69-
+ `__test__/test_data/schema.k`
69+
* `__test__/test_data/schema.k`
7070

7171
```python
7272
schema AppConfig:
@@ -77,39 +77,43 @@ app: AppConfig {
7777
}
7878
```
7979

80-
+ `execProgram`
80+
- `execProgram`
8181

8282
```ts
8383
import { execProgram, ExecProgramArgs } from "kcl-lib";
8484

8585
function main() {
8686
const result = execProgram(ExecProgramArgs(["__test__/test_data/schema.k"]));
87-
console.log(result.yamlResult); // 'app:\n replicas: 2'
87+
console.log(result.yamlResult); // 'app:\n replicas: 2'
8888
}
8989

9090
main();
9191
```
9292

93-
+ `listVariables`
93+
- `listVariables`
9494

9595
```ts
9696
import { listVariables, ListVariablesArgs } from "kcl-lib";
9797

9898
function main() {
99-
const result = listVariables(ListVariablesArgs('__test__/test_data/schema.k', []))
100-
console.log(result.variables['app'].value); // 'AppConfig {replicas: 2}'
99+
const result = listVariables(
100+
ListVariablesArgs("__test__/test_data/schema.k", []),
101+
);
102+
console.log(result.variables["app"].value); // 'AppConfig {replicas: 2}'
101103
}
102104

103105
main();
104106
```
105107

106-
+ `loadPackage`
108+
- `loadPackage`
107109

108110
```ts
109111
import { loadPackage, LoadPackageArgs } from "kcl-lib";
110112

111113
function main() {
112-
const result = loadPackage(LoadPackageArgs(['__test__/test_data/schema.k'], [], true));
114+
const result = loadPackage(
115+
LoadPackageArgs(["__test__/test_data/schema.k"], [], true),
116+
);
113117
console.log(result.symbols);
114118
}
115119

docs/tools/cli/kcl/lint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Examples:
5151

5252
# Lint multiple files
5353
kcl lint path/to/kcl1.k path/to/kcl2.k
54-
54+
5555
# Lint OCI packages
5656
kcl lint oci://ghcr.io/kcl-lang/helloworld
57-
57+
5858
# Lint the current package
5959
kcl lint
6060

docs/tools/cli/kcl/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Examples:
2828

2929
# Run multiple files
3030
kcl run path/to/kcl1.k path/to/kcl2.k
31-
31+
3232
# Run OCI packages
3333
kcl run oci://ghcr.io/kcl-lang/helloworld
34-
34+
3535
# Run remote Git repo
3636
kcl run https://github.com/kcl-lang/flask-demo-kcl-manifests
3737

docs/user_docs/support/faq-kcl.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,12 +2539,12 @@ The above KCL code gives the output:
25392539

25402540
```yaml
25412541
final_list:
2542-
- 1
2543-
- 2
2544-
- 3
2545-
- 4
2546-
- 5
2547-
- 6
2542+
- 1
2543+
- 2
2544+
- 3
2545+
- 4
2546+
- 5
2547+
- 6
25482548
```
25492549

25502550
## 61. What does `version: "v1" = "v1"` mean?
@@ -2553,20 +2553,20 @@ The first `"v1"` over here denotes that the type of the variable `version` is of
25532553

25542554
## 62. How to define a schema to verify the contents of a given JSON file?
25552555

2556-
We can use the kcl `vet` tool to validate the JSON data in a given JSOn file. For example, in the below data.json file we use the KCL file(schema.k) below to validate the `age` parameter.
2556+
We can use the kcl `vet` tool to validate the JSON data in a given JSOn file. For example, in the below data.json file we use the KCL file(schema.k) below to validate the `age` parameter.
25572557

25582558
data.json
25592559

25602560
```json
25612561
[
2562-
{
2563-
"name": "Alice",
2564-
"age": 18
2565-
},
2566-
{
2567-
"name": "Bob",
2568-
"age": 10
2569-
}
2562+
{
2563+
"name": "Alice",
2564+
"age": 18
2565+
},
2566+
{
2567+
"name": "Bob",
2568+
"age": 10
2569+
}
25702570
]
25712571
```
25722572

@@ -2583,7 +2583,6 @@ schema Person:
25832583

25842584
The command to validate the JSON data below gives the output `Validate success!`.
25852585

2586-
```bash
2586+
```bash
25872587
kcl vet data.json schema.k
25882588
```
2589-

i18n/zh-CN/docusaurus-plugin-content-blog/2024-04-17-newsletter/index.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ cargo add --git https://github.com/kcl-lang/lib
6666

6767
- KCL Node.js SDK 初版发布,仓库地址 [https://github.com/kcl-lang/lib/tree/main/nodejs](https://github.com/kcl-lang/lib/tree/main/nodejs), 欢迎共建
6868

69-
+ `__test__/test_data/schema.k`
69+
* `__test__/test_data/schema.k`
7070

7171
```python
7272
schema AppConfig:
@@ -77,39 +77,43 @@ app: AppConfig {
7777
}
7878
```
7979

80-
+ `execProgram`
80+
- `execProgram`
8181

8282
```ts
8383
import { execProgram, ExecProgramArgs } from "kcl-lib";
8484

8585
function main() {
8686
const result = execProgram(ExecProgramArgs(["__test__/test_data/schema.k"]));
87-
console.log(result.yamlResult); // 'app:\n replicas: 2'
87+
console.log(result.yamlResult); // 'app:\n replicas: 2'
8888
}
8989

9090
main();
9191
```
9292

93-
+ `listVariables`
93+
- `listVariables`
9494

9595
```ts
9696
import { listVariables, ListVariablesArgs } from "kcl-lib";
9797

9898
function main() {
99-
const result = listVariables(ListVariablesArgs('__test__/test_data/schema.k', []))
100-
console.log(result.variables['app'].value); // 'AppConfig {replicas: 2}'
99+
const result = listVariables(
100+
ListVariablesArgs("__test__/test_data/schema.k", []),
101+
);
102+
console.log(result.variables["app"].value); // 'AppConfig {replicas: 2}'
101103
}
102104

103105
main();
104106
```
105107

106-
+ `loadPackage`
108+
- `loadPackage`
107109

108110
```ts
109111
import { loadPackage, LoadPackageArgs } from "kcl-lib";
110112

111113
function main() {
112-
const result = loadPackage(LoadPackageArgs(['__test__/test_data/schema.k'], [], true));
114+
const result = loadPackage(
115+
LoadPackageArgs(["__test__/test_data/schema.k"], [], true),
116+
);
113117
console.log(result.symbols);
114118
}
115119

i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/lint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Examples:
5151

5252
# Lint multiple files
5353
kcl lint path/to/kcl1.k path/to/kcl2.k
54-
54+
5555
# Lint OCI packages
5656
kcl lint oci://ghcr.io/kcl-lang/helloworld
57-
57+
5858
# Lint the current package
5959
kcl lint
6060

i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Examples:
2626

2727
# Run multiple files
2828
kcl run path/to/kcl1.k path/to/kcl2.k
29-
29+
3030
# Run OCI packages
3131
kcl run oci://ghcr.io/kcl-lang/helloworld
32-
32+
3333
# Run remote Git repo
3434
kcl run https://github.com/kcl-lang/flask-demo-kcl-manifests
3535

i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/support/faq-kcl.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,12 +2545,12 @@ final_list = sum([[1,2],[3,4],[5,6]], [])
25452545

25462546
```yaml
25472547
final_list:
2548-
- 1
2549-
- 2
2550-
- 3
2551-
- 4
2552-
- 5
2553-
- 6
2548+
- 1
2549+
- 2
2550+
- 3
2551+
- 4
2552+
- 5
2553+
- 6
25542554
```
25552555

25562556
## 61. KCL 代码片段 `version: "v1" = "v1"` 是什么意思?

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/tools/cli/kcl/lint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Examples:
5151

5252
# Lint multiple files
5353
kcl lint path/to/kcl1.k path/to/kcl2.k
54-
54+
5555
# Lint OCI packages
5656
kcl lint oci://ghcr.io/kcl-lang/helloworld
57-
57+
5858
# Lint the current package
5959
kcl lint
6060

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/tools/cli/kcl/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Examples:
2626

2727
# Run multiple files
2828
kcl run path/to/kcl1.k path/to/kcl2.k
29-
29+
3030
# Run OCI packages
3131
kcl run oci://ghcr.io/kcl-lang/helloworld
32-
32+
3333
# Run remote Git repo
3434
kcl run https://github.com/kcl-lang/flask-demo-kcl-manifests
3535

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/user_docs/support/faq-kcl.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,12 +2545,12 @@ final_list = sum([[1,2],[3,4],[5,6]], [])
25452545

25462546
```yaml
25472547
final_list:
2548-
- 1
2549-
- 2
2550-
- 3
2551-
- 4
2552-
- 5
2553-
- 6
2548+
- 1
2549+
- 2
2550+
- 3
2551+
- 4
2552+
- 5
2553+
- 6
25542554
```
25552555

25562556
## 61. KCL 代码片段 `version: "v1" = "v1"` 是什么意思?

versioned_docs/version-0.8/tools/cli/kcl/lint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Examples:
5151

5252
# Lint multiple files
5353
kcl lint path/to/kcl1.k path/to/kcl2.k
54-
54+
5555
# Lint OCI packages
5656
kcl lint oci://ghcr.io/kcl-lang/helloworld
57-
57+
5858
# Lint the current package
5959
kcl lint
6060

versioned_docs/version-0.8/tools/cli/kcl/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Examples:
2828

2929
# Run multiple files
3030
kcl run path/to/kcl1.k path/to/kcl2.k
31-
31+
3232
# Run OCI packages
3333
kcl run oci://ghcr.io/kcl-lang/helloworld
34-
34+
3535
# Run remote Git repo
3636
kcl run https://github.com/kcl-lang/flask-demo-kcl-manifests
3737

versioned_docs/version-0.8/user_docs/support/faq-kcl.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,12 +2539,12 @@ The above KCL code gives the output:
25392539

25402540
```yaml
25412541
final_list:
2542-
- 1
2543-
- 2
2544-
- 3
2545-
- 4
2546-
- 5
2547-
- 6
2542+
- 1
2543+
- 2
2544+
- 3
2545+
- 4
2546+
- 5
2547+
- 6
25482548
```
25492549

25502550
## 61. What does `version: "v1" = "v1"` mean?
@@ -2553,20 +2553,20 @@ The first `"v1"` over here denotes that the type of the variable `version` is of
25532553

25542554
## 62. How to define a schema to verify the contents of a given JSON file?
25552555

2556-
We can use the kcl `vet` tool to validate the JSON data in a given JSOn file. For example, in the below data.json file we use the KCL file(schema.k) below to validate the `age` parameter.
2556+
We can use the kcl `vet` tool to validate the JSON data in a given JSOn file. For example, in the below data.json file we use the KCL file(schema.k) below to validate the `age` parameter.
25572557

25582558
data.json
25592559

25602560
```json
25612561
[
2562-
{
2563-
"name": "Alice",
2564-
"age": 18
2565-
},
2566-
{
2567-
"name": "Bob",
2568-
"age": 10
2569-
}
2562+
{
2563+
"name": "Alice",
2564+
"age": 18
2565+
},
2566+
{
2567+
"name": "Bob",
2568+
"age": 10
2569+
}
25702570
]
25712571
```
25722572

@@ -2583,7 +2583,6 @@ schema Person:
25832583

25842584
The command to validate the JSON data below gives the output `Validate success!`.
25852585

2586-
```bash
2586+
```bash
25872587
kcl vet data.json schema.k
25882588
```
2589-

0 commit comments

Comments
 (0)