Skip to content

Commit cf2e4bc

Browse files
docs: Complete repository scripts reference
1 parent 26a0991 commit cf2e4bc

16 files changed

+68
-39
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"iactivity",
4242
"imessage",
4343
"Meoston",
44+
"mkdocs",
4445
"nagas",
4546
"nbsp",
4647
"oliversalzburg",

package.json-scripts.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,95 +34,107 @@
3434
"scriptName": "docs:build",
3535
"scriptCode": ".scripts/build.sh",
3636
"isGlobal": true,
37-
"isRootManifest": false
37+
"isRootManifest": false,
38+
"description": "Build the documentation."
3839
},
3940
{
4041
"manifestPath": "packages/documentation/package.json",
4142
"projectName": "@kitten-science/documentation",
4243
"scriptName": "docs:nsd",
4344
"scriptCode": "nsd --cwd=$INIT_CWD --docs-location=\"packages/documentation/docs/reference/Repository Scripts/\"",
4445
"isGlobal": true,
45-
"isRootManifest": false
46+
"isRootManifest": false,
47+
"description": "Update the scripts documentation that you are looking at right now."
4648
},
4749
{
4850
"manifestPath": "packages/documentation/package.json",
4951
"projectName": "@kitten-science/documentation",
5052
"scriptName": "docs:serve",
5153
"scriptCode": ".scripts/serve.sh",
5254
"isGlobal": true,
53-
"isRootManifest": false
55+
"isRootManifest": false,
56+
"description": "Start the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) development server to work on the documentation."
5457
},
5558
{
5659
"manifestPath": "package.json",
5760
"projectName": "kitten-scientists",
5861
"scriptName": "lint:all",
5962
"scriptCode": "eslint . --ext .ts",
6063
"isGlobal": true,
61-
"isRootManifest": true
64+
"isRootManifest": true,
65+
"description": "Check source code for style issues."
6266
},
6367
{
6468
"manifestPath": "packages/tests/package.json",
6569
"projectName": "@kitten-science/tests",
6670
"scriptName": "tests:build",
6771
"scriptCode": "tsc --build",
6872
"isGlobal": true,
69-
"isRootManifest": false
73+
"isRootManifest": false,
74+
"description": "Build tests."
7075
},
7176
{
7277
"manifestPath": "packages/tests/package.json",
7378
"projectName": "@kitten-science/tests",
7479
"scriptName": "tests:run",
7580
"scriptCode": "mocha output/tests/*.spec.js",
7681
"isGlobal": true,
77-
"isRootManifest": false
82+
"isRootManifest": false,
83+
"description": "Execute tests."
7884
},
7985
{
8086
"manifestPath": "package.json",
8187
"projectName": "kitten-scientists",
8288
"scriptName": "typecheck:all",
8389
"scriptCode": "tsc --noEmit --incremental false",
8490
"isGlobal": true,
85-
"isRootManifest": true
91+
"isRootManifest": true,
92+
"description": "Run the TypeScript compiler to find problems with the code."
8693
},
8794
{
8895
"manifestPath": "packages/userscript/package.json",
8996
"projectName": "@kitten-science/userscript",
9097
"scriptName": "userscript:build",
9198
"scriptCode": "vite --config vite.config.inject.js build",
9299
"isGlobal": true,
93-
"isRootManifest": false
100+
"isRootManifest": false,
101+
"description": "Build the userscript.\n\nThis builds the version of the script that is also used in the development container."
94102
},
95103
{
96104
"manifestPath": "packages/userscript/package.json",
97105
"projectName": "@kitten-science/userscript",
98106
"scriptName": "userscript:preview",
99107
"scriptCode": "DEV_BUILD=true vite --config vite.config.userscript.js build",
100108
"isGlobal": true,
101-
"isRootManifest": false
109+
"isRootManifest": false,
110+
"description": "Build a development release version of the userscript."
102111
},
103112
{
104113
"manifestPath": "packages/userscript/package.json",
105114
"projectName": "@kitten-science/userscript",
106115
"scriptName": "userscript:release",
107116
"scriptCode": "MINIFY=true vite --config vite.config.userscript.js build; vite --config vite.config.userscript.js build",
108117
"isGlobal": true,
109-
"isRootManifest": false
118+
"isRootManifest": false,
119+
"description": "Build a release version of the userscript.\n\nThis is usually only used from CI to build both the regular version of the script, as well as a minified build. When you use this locally, it still builds both files, but clears the output directory between builds. So you end up with only the regular version."
110120
},
111121
{
112122
"manifestPath": "packages/userscript/package.json",
113123
"projectName": "@kitten-science/userscript",
114124
"scriptName": "userscript:version",
115125
"scriptCode": "node version.cjs",
116126
"isGlobal": true,
117-
"isRootManifest": false
127+
"isRootManifest": false,
128+
"description": "Returns the version for the userscript."
118129
},
119130
{
120131
"manifestPath": "packages/userscript/package.json",
121132
"projectName": "@kitten-science/userscript",
122133
"scriptName": "userscript:watch",
123134
"scriptCode": "vite --config vite.config.inject.js build --watch",
124135
"isGlobal": true,
125-
"isRootManifest": false
136+
"isRootManifest": false,
137+
"description": "Builds the userscript and watches all files for changes. If changes are detected, the script is rebuilt.\n\n!!! warning\n\n This watcher has caused problems in the past, generating broken output. Use at your own risk."
126138
},
127139
{
128140
"manifestPath": "packages/userscript/package.json",

packages/documentation/docs/development.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Whenever you want to see the result of your changes, use:
2222
yarn userscript:build
2323
```
2424

25-
This will build a fresh version of the userscript. _If_ you are running a development container, this build output will also be used the next time you refresh the page.
25+
This will [build a fresh version of the userscript](/reference/Repository Scripts/#userscriptbuild). _If_ you are running a development container, this build output will also be used the next time you refresh the page.
2626

2727
## Development with Kittens Game Container
2828

@@ -54,7 +54,7 @@ When the container is built, it downloads the latest version of the game from <h
5454

5555
Sadly, this behavior is known to produce broken output files. Use at your own risk and switch to manual builds as necessary.
5656

57-
If you ever want to rebuild the container from scratch, for example, to pull in the _latest_ source code of KG again, run:
57+
If you ever want to [rebuild the container from scratch](/reference/Repository Scripts/#devcontainerrebuild), for example, to pull in the _latest_ source code of KG again, run:
5858

5959
```shell
6060
yarn devcontainer:rebuild
@@ -74,7 +74,7 @@ To develop without containers, you can build a development version of the usersc
7474

7575
## Type-Checking
7676

77-
To fill the **Problems** panel in VS Code with all current, type-related errors, run the `typecheck:all` npm task in VS Code.
77+
To fill the **Problems** panel in VS Code with all current, type-related errors, run the [`typecheck:all`](/reference/Repository Scripts/#typecheckall) npm task in VS Code.
7878

7979
## Releases
8080

packages/documentation/docs/reference/Repository Scripts/.docs$$build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Build the documentation.

packages/documentation/docs/reference/Repository Scripts/.docs$$nsd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Update the scripts documentation that you are looking at right now.

packages/documentation/docs/reference/Repository Scripts/.docs$$serve.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Start the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) development server to work on the documentation.

packages/documentation/docs/reference/Repository Scripts/.lint$$all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Check source code for style issues.

packages/documentation/docs/reference/Repository Scripts/.tests$$build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Build tests.

packages/documentation/docs/reference/Repository Scripts/.tests$$run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Execute tests.

packages/documentation/docs/reference/Repository Scripts/.typecheck$$all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
- Description:
1111

12-
_documentation pending_
12+
Run the TypeScript compiler to find problems with the code.

0 commit comments

Comments
 (0)