Skip to content

Commit

Permalink
TGUI maintenance chores and juke upgrades (#6247)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksej Komarov <[email protected]>
Co-authored-by: mokulus <[email protected]>
Co-authored-by: SplinterGP <[email protected]>
Co-authored-by: Mothblocks <[email protected]>
  • Loading branch information
5 people authored Jan 28, 2022
1 parent 276b7e2 commit 95060e4
Show file tree
Hide file tree
Showing 93 changed files with 12,493 additions and 11,834 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
find . -name "*.php" -print0 | xargs -0 -n1 php -l
find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
bash tools/ci/check_grep.sh
tgui/bin/tgui --lint
tgui/bin/tgui --test
tools/build/build --ci lint tgui-test
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker
Expand All @@ -61,7 +60,7 @@ jobs:
run: |
source $HOME/BYOND/byond/bin/byondsetup
python3 tools/ci/template_dm_generator.py
tools/build/build dm -DCIBUILDING -DCITESTING -DALL_MAPS
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
run_all_tests:
runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -100,7 +99,7 @@ jobs:
- name: Compile and run tests
run: |
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build -DCIBUILDING
tools/build/build --ci build -DCIBUILDING
bash tools/ci/run_server.sh
test_windows:
runs-on: windows-latest
Expand Down
58 changes: 55 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,73 @@
},
{
"type": "shell",
"command": "tgui/bin/tgui",
"command": "bin/test",
"windows": {
"command": ".\\tgui\\bin\\tgui.bat"
"command": ".\\bin\\test.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: build"
"label": "Run All Tests"
},
{
"command": "${command:dreammaker.reparse}",
"group": "build",
"label": "dm: reparse"
},
{
"type": "shell",
"command": "bin/tgui-build",
"windows": {
"command": ".\\bin\\tgui-build.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: build"
},
{
"type": "shell",
"command": "bin/tgui-dev",
"windows": {
"command": ".\\bin\\tgui-dev.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: dev server"
},
{
"type": "shell",
"command": "bin/tgui-bench",
"windows": {
"command": ".\\bin\\tgui-bench.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: bench"
},
{
"type": "shell",
"command": "bin/tgui-sonar",
"windows": {
"command": ".\\bin\\tgui-sonar.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: sonar"
}
]
}
3 changes: 1 addition & 2 deletions BUILD.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@echo off
call "%~dp0\tools\build\build.bat" %*
pause
call "%~dp0\tools\build\build.bat" --wait-on-error build %*
2 changes: 2 additions & 0 deletions bin/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error build %*
2 changes: 2 additions & 0 deletions bin/clean.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error clean-all %*
2 changes: 2 additions & 0 deletions bin/server.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error server %*
3 changes: 3 additions & 0 deletions bin/test.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui lint tgui-test %*
call "%~dp0\..\tools\build\build.bat" --wait-on-error dm-test -DCITESTING -DALL_MAPS %*
3 changes: 3 additions & 0 deletions bin/tgui-bench.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-bench %*
pause
2 changes: 2 additions & 0 deletions bin/tgui-build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui tgui-lint tgui-test %*
2 changes: 2 additions & 0 deletions bin/tgui-dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-dev %*
2 changes: 2 additions & 0 deletions bin/tgui-sonar.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-sonar %*
6 changes: 0 additions & 6 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
//DEFINITIONS FOR ASSET DATUMS START HERE.

/datum/asset/simple/tgui_common
keep_local_name = TRUE
assets = list(
"tgui-common.bundle.js" = file("tgui/public/tgui-common.bundle.js"),
)

/datum/asset/simple/tgui
keep_local_name = TRUE
assets = list(
Expand Down
1 change: 0 additions & 1 deletion code/modules/tgui/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
window.initialize(
fancy = user.client.prefs.tgui_fancy,
inline_assets = list(
get_asset_datum(/datum/asset/simple/tgui_common),
get_asset_datum(/datum/asset/simple/tgui),
))
else
Expand Down
1 change: 0 additions & 1 deletion code/modules/tgui_panel/tgui_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
initialized_at = world.time
// Perform a clean initialization
window.initialize(inline_assets = list(
get_asset_datum(/datum/asset/simple/tgui_common),
get_asset_datum(/datum/asset/simple/tgui_panel),
))
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome))
Expand Down
3 changes: 0 additions & 3 deletions tgui/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = 80
43 changes: 0 additions & 43 deletions tgui/.eslintrc-harder.yml

This file was deleted.

26 changes: 26 additions & 0 deletions tgui/.eslintrc-sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
rules:
# radar/cognitive-complexity: error
radar/max-switch-cases: error
radar/no-all-duplicated-branches: error
radar/no-collapsible-if: error
radar/no-collection-size-mischeck: error
radar/no-duplicate-string: error
radar/no-duplicated-branches: error
radar/no-element-overwrite: error
radar/no-extra-arguments: error
radar/no-identical-conditions: error
radar/no-identical-expressions: error
radar/no-identical-functions: error
radar/no-inverted-boolean-check: error
radar/no-one-iteration-loop: error
radar/no-redundant-boolean: error
radar/no-redundant-jump: error
radar/no-same-line-conditional: error
radar/no-small-switch: error
radar/no-unused-collection: error
radar/no-use-of-empty-return-value: error
radar/no-useless-catch: error
radar/prefer-immediate-return: error
radar/prefer-object-literal: error
radar/prefer-single-boolean-return: error
radar/prefer-while: error
7 changes: 3 additions & 4 deletions tgui/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
*.md text eol=lf
*.bat text eol=lf
yarn.lock text eol=lf
bin/tgui text eol=lf

## Treat bundles as binary and ignore them during conflicts
*.bundle.* binary merge=tgui-merge-bundle
*.chunk.* binary merge=tgui-merge-bundle
## Treat bundles as binary
*.bundle.* binary
*.chunk.* binary
.yarn/releases/**/* binary
.yarn/plugins/**/* binary
1 change: 1 addition & 0 deletions tgui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package-lock.json
/public/.tmp/**/*
/public/**/*
!/public/*.html
/coverage

## Previously ignored locations that are kept to avoid confusing git
## while transitioning to a new project structure.
Expand Down
Loading

0 comments on commit 95060e4

Please sign in to comment.