Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
- name: Get version
id: version
run: |
export KS_VERSION=$(yarn userscript:version)
export KS_VERSION=$(yarn kitten-scientists:version)
echo "KS_VERSION=$KS_VERSION" >> $GITHUB_ENV

- name: Build userscript
- name: Build Kitten Scientists
run: |
yarn userscript:build
cp packages/userscript/output/* packages/kitten-game/kitten-scientists/
yarn kitten-scientists:build
cp packages/kitten-scientists/output/* packages/kitten-game/kitten-scientists/

- name: Log in to the Container registry
uses: docker/login-action@master
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/userscript-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Userscript Nightly
name: Publish Kitten Scientists Nightly

on:
schedule:
Expand Down Expand Up @@ -49,15 +49,15 @@ jobs:

- name: Get version
run: |
export KS_VERSION=$(yarn userscript:version)
export KS_VERSION=$(yarn kitten-scientists:version)
echo "KS_VERSION=$KS_VERSION" >> $GITHUB_ENV
- run: yarn userscript:release
- run: yarn kitten-scientists:release
- uses: marvinpinto/[email protected]
with:
automatic_release_tag: nightly
draft: false
files: |
packages/userscript/output/*
packages/kitten-scientists/output/*
prerelease: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: Nightly Build v${{ env.KS_VERSION }}
8 changes: 4 additions & 4 deletions .github/workflows/userscript-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Userscript Push
name: Publish Kitten Scientists Push

on:
push:
Expand Down Expand Up @@ -31,15 +31,15 @@ jobs:

- name: Get version
run: |
export KS_VERSION=$(yarn userscript:version)
export KS_VERSION=$(yarn kitten-scientists:version)
echo "KS_VERSION=$KS_VERSION" >> $GITHUB_ENV
- run: yarn userscript:release
- run: yarn kitten-scientists:release
- uses: marvinpinto/[email protected]
with:
automatic_release_tag: next
draft: false
files: |
packages/userscript/output/*
packages/kitten-scientists/output/*
prerelease: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: Development Build v${{ env.KS_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/userscript-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- run: yarn build:all
- run: yarn lint:all
- run: yarn userscript:build
- run: yarn kitten-scientists:build

- run: yarn workspace @kitten-science/action-commit-validator tsc --build

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/userscript-tagged-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Userscript Release
name: Publish Kitten Scientists Release

on:
push:
Expand Down Expand Up @@ -27,14 +27,14 @@ jobs:
- run: yarn build:all
- run: yarn lint:all

- run: yarn userscript:release
- run: yarn kitten-scientists:release

- uses: marvinpinto/[email protected]
with:
# Create only as draft, so we can add a description on the web UI.
draft: true
files: |
packages/userscript/output/*
packages/kitten-scientists/output/*
prerelease: false
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: ${{ github.ref_name }}
18 changes: 5 additions & 13 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@
"version": "2.0.0",
"tasks": [
{
"label": "Type-check userscript",
"label": "Type-check kitten-scientists",
"type": "shell",
"command": [
"yarn",
"typecheck:all"
],
"problemMatcher": [
"$tsc"
]
"command": ["yarn", "typecheck:all"],
"problemMatcher": ["$tsc"]
},
{
"label": "Build+watch userscript",
"label": "Build+watch kitten-scientists",
"type": "shell",
"command": [
"yarn",
"userscript:watch"
],
"command": ["yarn", "kitten-scientists:watch"],
"problemMatcher": [
// See: https://marketplace.visualstudio.com/items?itemName=eamodio.tsl-problem-matcher
"$ts-webpack-watch"
Expand Down
4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
files:
- source: /packages/userscript/source/i18n/en.json
translation: /packages/userscript/source/i18n/%two_letters_code%.json
- source: /packages/kitten-scientists/source/i18n/en.json
translation: /packages/kitten-scientists/source/i18n/%two_letters_code%.json
113 changes: 62 additions & 51 deletions package.json-scripts.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
{
"comment": "This file is generated by node-scripts-docs.",
"scripts": [
{
"manifestPath": "package.json",
"projectName": "kitten-scientists",
"scriptName": "build:all",
"scriptCode": "tsc --build",
"isGlobal": true,
"isRootManifest": true
},
{
"manifestPath": "package.json",
"projectName": "kitten-scientists",
"scriptName": "clean:all",
"scriptCode": "rm -rf packages/*/build packages/*/tsconfig.tsbuildinfo",
"isGlobal": true,
"isRootManifest": true
},
{
"manifestPath": "packages/kitten-game/package.json",
"projectName": "@kitten-science/kitten-game",
"scriptName": "devcontainer:build",
"scriptCode": "docker build --tag kitten-game .",
"scriptCode": "bash ./scripts/build-development-container.sh",
"isGlobal": true,
"isRootManifest": false,
"description": "Builds the Development Container."
Expand All @@ -14,7 +30,7 @@
"manifestPath": "packages/kitten-game/package.json",
"projectName": "@kitten-science/kitten-game",
"scriptName": "devcontainer:rebuild",
"scriptCode": "docker build --no-cache --tag kitten-game .",
"scriptCode": "bash ./scripts/rebuild-development-container.sh",
"isGlobal": true,
"isRootManifest": false,
"description": "Rebuilds the development container.\n\nYou're going to want to rebuild your development container every once in a while to ensure you're using the latest version of Kittens Game in your container."
Expand Down Expand Up @@ -55,6 +71,46 @@
"isRootManifest": false,
"description": "Start the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) development server to work on the documentation."
},
{
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "kitten-scientists:build",
"scriptCode": "vite --config vite.config.inject.js build",
"isGlobal": true,
"isRootManifest": false
},
{
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "kitten-scientists:preview",
"scriptCode": "DEV_BUILD=true vite --config vite.config.userscript.js build",
"isGlobal": true,
"isRootManifest": false
},
{
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "kitten-scientists:release",
"scriptCode": "MINIFY=true vite --config vite.config.userscript.js build; vite --config vite.config.userscript.js build",
"isGlobal": true,
"isRootManifest": false
},
{
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "kitten-scientists:version",
"scriptCode": "node version.cjs",
"isGlobal": true,
"isRootManifest": false
},
{
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "kitten-scientists:watch",
"scriptCode": "vite --config vite.config.inject.js build --watch",
"isGlobal": true,
"isRootManifest": false
},
{
"manifestPath": "package.json",
"projectName": "kitten-scientists",
Expand All @@ -77,7 +133,7 @@
"manifestPath": "packages/tests/package.json",
"projectName": "@kitten-science/tests",
"scriptName": "tests:run",
"scriptCode": "mocha output/tests/*.spec.js",
"scriptCode": "mocha ./build/tests/*.spec.js",
"isGlobal": true,
"isRootManifest": false,
"description": "Execute tests."
Expand All @@ -92,55 +148,10 @@
"description": "Run the TypeScript compiler to find problems with the code."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"scriptName": "userscript:build",
"scriptCode": "vite --config vite.config.inject.js build",
"isGlobal": true,
"isRootManifest": false,
"description": "Build the userscript.\n\nThis builds the version of the script that is also used in the development container."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"scriptName": "userscript:preview",
"scriptCode": "DEV_BUILD=true vite --config vite.config.userscript.js build",
"isGlobal": true,
"isRootManifest": false,
"description": "Build a development release version of the userscript."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"scriptName": "userscript:release",
"scriptCode": "MINIFY=true vite --config vite.config.userscript.js build; vite --config vite.config.userscript.js build",
"isGlobal": true,
"isRootManifest": false,
"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."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"scriptName": "userscript:version",
"scriptCode": "node version.cjs",
"isGlobal": true,
"isRootManifest": false,
"description": "Returns the version for the userscript."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"scriptName": "userscript:watch",
"scriptCode": "vite --config vite.config.inject.js build --watch",
"isGlobal": true,
"isRootManifest": false,
"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."
},
{
"manifestPath": "packages/userscript/package.json",
"projectName": "@kitten-science/userscript",
"manifestPath": "packages/kitten-scientists/package.json",
"projectName": "@kitten-science/kitten-scientists",
"scriptName": "whoami",
"scriptCode": "echo userscript",
"scriptCode": "echo kitten-scientists",
"isGlobal": false,
"isRootManifest": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## build:all

- Project: `kitten-scientists`
- Source:

```shell
tsc --build
```

- Description:

_documentation pending_
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## clean:all

- Project: `kitten-scientists`
- Source:

```shell
rm -rf packages/*/build packages/*/tsconfig.tsbuildinfo
```

- Description:

_documentation pending_
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- Source:

```shell
docker build --tag kitten-game .
bash ./scripts/build-development-container.sh
```

- Description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- Source:

```shell
docker build --no-cache --tag kitten-game .
bash ./scripts/rebuild-development-container.sh
```

- Description:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## userscript:build
## kitten-scientists:build

- Project: `@kitten-science/userscript`
- Project: `@kitten-science/kitten-scientists`
- Source:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## userscript:preview
## kitten-scientists:preview

- Project: `@kitten-science/userscript`
- Project: `@kitten-science/kitten-scientists`
- Source:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## userscript:release
## kitten-scientists:release

- Project: `@kitten-science/userscript`
- Project: `@kitten-science/kitten-scientists`
- Source:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## userscript:version
## kitten-scientists:version

- Project: `@kitten-science/userscript`
- Project: `@kitten-science/kitten-scientists`
- Source:

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## userscript:watch
## kitten-scientists:watch

- Project: `@kitten-science/userscript`
- Project: `@kitten-science/kitten-scientists`
- Source:

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- Source:

```shell
mocha output/tests/*.spec.js
mocha ./build/tests/*.spec.js
```

- Description:
Expand Down
Loading