Commit Graph

46 Commits

Author SHA1 Message Date
Kashargul
3b3c21734a exclude node_modules from search (#91995)
## About The Pull Request
No player facing changes. Excludes the node_modules folder from vscode
search by default. With the new package management, we don't want to
always see all the module files while searching through tgui files.

## Changelog
Excludes node_modules from vscode search
2025-07-11 17:56:29 -04:00
Mikhail G.
85dec714d3 Fix: linux build file name (#91877) 2025-07-04 16:33:05 -04:00
Jeremiah
4e1f33e5af [tgui] Replaces node with bun (#91359)
## About The Pull Request
Swaps out node & yarn in favor of [bun](https://bun.sh/)

![image](https://github.com/user-attachments/assets/3df68cdf-98ed-477b-a9b6-5072d0de27ed)

sub tasks
- [x] add bun setup script
- [x] fix tgui-dev-server (bun glob is different)
- [x] set juke to run bun
- [x] remove all yarn stuff 
- [x] convert all tests from vitest to bun 
- [x] fight with CI/tgs

## Why It's Good For The Game
Yarn has served us over the years as our package manager but the method
it bundles dependencies has lead to issues and setbacks, notably needing
to wait on rspack support, but more recently in trying to switch to
biome
1. I can add in packages that do not need these workarounds, like god
intended
2. We won't need to [keep around
sdks](https://yarnpkg.com/getting-started/editor-sdks) which rely on
yarn to even publish
3. We're not committing the yarn cache or .pnp file, which kind of
defeats the purpose
4. Native typescript support and testing
5. Because it'd be cool

## Caveats
Rspack was throwing errors on TGS while doing this. I needed to switch
back to webpack/swc, which seems to work flawlessly. It was too tiring
for anyone involved to debug and this was the simplest route. It adds a
completely negligible amount of time to build. It might even resolve
some issues elsewhere.

Making this switch extends that very first setup time! I'm working on
cutting it down, but as of right now, it takes about 80 seconds just for
TGUI to download all the packages. Afterwards, it's the same.
## Changelog
2025-06-21 22:20:20 -04:00
Jeremiah
a5a4b83a25 Sets prettier to run on the repo (#91379)
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
2025-06-05 19:13:02 -04:00
Holoo
f9cdc0d89d Testing compile options (#90961) 2025-05-22 21:12:27 -04:00
Jeremiah
a7df5f2526 Fixes prettier file associations (#88832)
## About The Pull Request
Small change that not only saves a few lines from our current config but
also enforces prettier on other file types (INSIDE tgui).

VS Code is kind of confusing in re: formatter settings and which setting
takes precedence. I've learned that adding this just fixes weirdness
with user-set formatters. This overrides local configuration, which we
are trying to do anyway with .editorconfig.

Based on [this informative
tweet](https://x.com/colinhacks/status/1841934672647094599) by
colinhacks, creator of zod
## Why It's Good For The Game
More PRs can pass linters on CI
## Changelog

N/A
2025-01-04 08:40:06 -05:00
MrMelbert
216e660e64 Adds launch option for OpenDream VSCode extension (#87393)
## About The Pull Request

Adds a vscode launch option to support the new (well, it's a few months
old now) OpenDream extension.
2024-10-25 01:50:25 +02:00
Zephyr
7f8752be14 Admin Verb Datums MkIII | Now with functional command bar (#82511) 2024-04-12 12:27:09 -07:00
Jeremiah
318857c302 Reverts 82333 (#82608)
## About The Pull Request
#82333 

I was mistaken

The inconsistent indentation warnings are killing me

I tried
## Why It's Good For The Game
Developer sanity
2024-04-12 07:14:39 -04:00
Jeremiah
4339fcb264 Removes editorconfig and suggested extension (#82333)
## About The Pull Request
(Correct me if I'm wrong here but) this is made obsolete by prettier and
our vscode settings
## Why It's Good For The Game
Removes obsolete tools
## Changelog
N/A nothing player facing
2024-03-31 17:47:22 -06:00
Lucy
66b3696abf Add LOWMEMORYMODE versions of all the build/run tasks (#81906)
## About The Pull Request

This simply adds versions of the build/run vscode tasks that add
`-DLOWMEMORYMODE` when calling the build script, which compiles the
server with the `LOWMEMORYMODE` define, for faster testing of features.


![image](https://github.com/tgstation/tgstation/assets/65794972/ca679fef-2415-475b-86c0-2b40757f9bc3)

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-14 17:02:47 +01:00
LemonInTheDark
fdf8d26d4a Warns in VScode about commits to master (#81908)
## About The Pull Request

If you're jim the new dev and you're using vscode to make commits to
master, let's add a "what's this" message for you before you do so
accidentially.


## Why It's Good For The Game

Should hopefully save some heartache for people who do not yet know how
branches work
2024-03-09 19:56:11 -07:00
Jeremiah
2631b0b8ef Replaces prettierx with the normal prettier (#80189)
## About The Pull Request
Oh god the file diff... I'm so, so sorry.

No need to worry though. This just replaces the prettierx version that
we were using and replaces it with normal prettier. Most of the settings
were default or no longer valid with this version.
## Why It's Good For The Game
You no longer get this warning #70484

It actually drives me up the wall and I have to click it each time I
open my editor.
## Changelog
N/A nothing player facing
2023-12-09 11:18:17 +13:00
AnturK
c6fb4f3a47 Cleans up tgfont build command (#69786)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-09-08 16:59:46 -07:00
William Wallace
30ce8feb17 Launch Dreamseeker is the default vscode launch config once again (#68666) 2022-07-25 15:22:50 -05:00
Mothblocks
99fb15a462 Pointing at something on yourself now shows the item (#68642)
Why It's Good For The Game

Further reducing reliance on reading the chat box. Previously it wasn't obvious someone pointing at themselves was pointing at something on them, and not just, them.
Changelog

cl
qol: Pointing at something on yourself now shows the item.
/cl
2022-07-25 10:16:55 +12:00
Y0SH1M4S73R
4e6e1f090e [Ready for Review] Admin lua scripting (#65635)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-07-19 15:45:23 -07:00
Jeremiah
731ab29aa7 Adds Prettierx - or how I broke TGUI for the nth time (#67935)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-06-23 18:10:22 -07:00
san7890
6f3f8bc882 Removes "gbasood.byond-dm-language-support" from Extensions.json (#66862)
I read ZeWaka's recommendation here: https://github.com/tgstation/tgstation/pull/66834#pullrequestreview-966871661, and I thought it was a fair point. I also spoke with oranges about this same extension last month while I was writing my guide to mapping, and he confirmed the same thing ZeWaka was saying.
2022-05-11 20:50:22 -04:00
AnturK
64bbbcd1d0 Switches vscode dmi editor to new one. (#66834)
https://marketplace.visualstudio.com/items?itemName=anturk.dmi-editor
2022-05-10 15:02:13 -04:00
SplinterGP
e06b82a7f4 Updates VSC tgui tasks (#62067)
* tgui tasks

* solve linter?
2021-10-14 11:16:09 +03:00
Kyle Spier-Swenson
c77aad7fd8 Instructs vscode to insert final newlines into to files (#60405)
If we're gonna lint for it we might as well automate it.
2021-07-24 03:49:12 -07:00
Watermelon914
f3d1c73d1a Updates vscode settings to remove the warning with workbench.editorAssociations (#59604)
This vscode setting was changed from array to object in https://github.com/microsoft/vscode/pull/123017
2021-06-12 18:22:59 +01:00
Kylerace
caa2b1507d adds a launch dreamseeker option to vsc (#59346) 2021-05-28 02:28:45 -07:00
tralezab
4ac8dda3ee Run and Debug now uses dreamdaemon instead of dreamseeker (#59295)
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-05-26 20:33:21 -07:00
William Wallace
c75c7c5cb3 trigger spacemandmm reparse in CBT 'Build All' task (#58061) 2021-03-31 02:07:07 +01:00
Aleksej Komarov
8080a5132c tgui: ESLint and VSCode settings improvements (#57905)
Added column 80 rulers to all javascript and scss files.
    Added a "prettier" config to have sensible defaults for those who prefer to use it.
    Added RadarJS (fork of SonarQube's SonarJS). Launchable only via bin/tgui --lint-harder for now.
    Disabled ESLint rule for parens around arrow function arguments, because in TypeScript they're pretty much always required, and I don't want to replace it throughout the codebase.
    Removed unused javascript extensions from tooling (jsx, mjs).
2021-03-23 23:35:19 +00:00
Aleksej Komarov
98d8f2e13a Add "ESLint Fix All" on Ctrl+S to .vscode/settings.json (#57698) 2021-03-13 19:15:54 -08:00
Aleksej Komarov
9447383f5a tgui: Upgrade to Yarn 2.4.1 and TypeScript 4.2 (#57465) 2021-03-06 14:42:56 -08:00
Aleksej Komarov
21d5a65346 Fix a number of build issues (#57251)
* Fix finding of dreamseeker instances and not die on cache copy failures

* Upgrade dependencies, resolve webpack dependencies explicitly

* Preload tgui asset to fix reloading of a not yet sent tgui asset

* Rewrite node bootstrap and DM build task

* Redundant array accessor

* Add install-state.gz to tgui build dependencies

* Update build.js

* Use a proper dmlang vscode var
2021-02-28 14:24:34 +01:00
Aleksej Komarov
1fb5d68b53 tgui: Typescript and Jest update (#57081)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-02-22 01:18:35 -08:00
Aleksej Komarov
17c174ece2 Superior auto comment blocks VSCode extension (#56194) 2021-01-16 05:58:04 +02:00
AnturK
4db3081524 Makes build all default task in vscode. (#56178) 2021-01-15 15:23:46 +02:00
Aleksej Komarov
a5d362ce84 Common Build Tooling (#55373)
Add Common Build Tooling

## Information for Developers

On Windows, the build scripts will automatically install Node. Other 
platforms should use their package manager or download it from 
https://nodejs.org/en/download/

Pick one:

- VSCode: `Ctrl+Shift+B`
- VSCode: `F5` (build & run with debugger) or `Ctrl+F5` (build & run 
  without debugger)
- Windows: double-click root `Build.bat` (pause to see output) or 
  `tools/build/build.bat` (no pause)
- Git Bash and non-Windows: `tools/build/build`

## Information for Server Admins

- TGS scripts will automatically install the version of Node specified 
  in `dependencies.sh`
- Either use this build script, or compile tgui by running any script 
  in `tgui/bin` folder.

## Details

Both dm and tgui are now built with a single script. It's pretty easy 
to launch: just press `Ctrl+Shift+B` in VSCode, and tada! 🎉 

**It's smart.** It will skip certain steps if source files were 
untouched for that step. So, if you're only touching dm code, it will 
only rebuild dm code, and will skip tgui.

**Syntax is fairly readable and maintainable.**

```js
const { Task, runTasks, exec } = require('./cbt');

const taskTgui = new Task('tgui')
  .depends('tgui/yarn.lock')
  .depends('tgui/packages/**/*.js')
  .provides('tgui/public/*.bundle.*')
  .provides('tgui/public/*.chunk.*')
  .build(async () => {
    await exec('tgui/bin/tgui');
  });

runTasks([taskTgui]);
```

**This is a long term solution to the js bundle hell.** Now that we 
have a single script to build everything, bundles have been excluded 
from the repo, and they will no longer cause conflicts in PRs. This 
results in quicker PR turnaround time and less time wasted on 
rebuilding tgui for PRs.

**CI pipelines have been updated.** They're not coded in the most 
optimal way, just making them green for now.

## Possible future work

- Support compiling with DM defines by passing them as an argument, 
  like `-D LOWMEMORYMODE`.
- Instead of explicitly listing the task sequence in `runTasks()`, 
  support specifying tasks in `.depends()`, which in turn will allow 
  building a graph of dependencies and running things in parallel.

Co-authored-by: Tad Hardesty <tad@platymuus.com>

- Add root Build.bat
- Add trio of tools/bootstrap/ scripts for Node
- Add tools/build/README.md
- Ensure build script and VSC configuration works properly on Linux
- Update TGS4 PreCompile scripts

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>

- Keep PreCompile scripts compatible with TGS3 as well
- Update LinuxOneShot PreCompile scripts
- Update TGS4 configuration
2021-01-14 10:39:38 -05:00
Donkie
e71e7cbbe2 Added a standardized json unit test results log and added my vscode test runner to recommendations (#56058)
Link to the test explorer: https://marketplace.visualstudio.com/items?itemName=Donkie.vscode-tgstation-test-adapter

The test explorer adapter lets you compile and run the code in one click of a button, with no messing about with defines necessary

The extension supports reading test results from the unit test logs, but its shitty having to parse logs for that, so this PR also adds support for a somewhat standardized method of logging unit test results to a json file instead.
2021-01-10 20:31:17 +00:00
oranges
4353d7b885 Recommend autodoc block comment plugin (#55422)
Recommend autodoc block comment plugin
2020-12-10 23:24:25 +00:00
Aleksej Komarov
5b382799b9 tgui: Refactor Asset Delivery (#54895)
* tgui: Refactor Asset Delivery

* Re-enable printing of initial backend update payload

* Fix oopsie woopsie hotkey, tgui.html syntax and ntos flavor
2020-11-14 03:51:51 +02:00
Tad Hardesty
1a6aba23f7 Add VSCode setting to ignore whitespace in git blame (#53534)
Doesn't use --ignore-revs-file because it was added in a more recent Git version (2.23.0) than Ubuntu 18.04 ships (2.17.1)
2020-09-08 19:29:27 -03:00
ShizCalev
74158d8a1b Sets vscode to default to unix / LF line endings (#52273) 2020-07-16 20:45:45 +12:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
spookydonut
e0238bdc06 Enable DMI preview in VScode (#51019)
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2020-05-10 11:45:31 -07:00
AnturK
63d1ea8c72 Fix eslint for vscode (#49863) 2020-03-10 18:31:32 -07:00
actioninja
4ed038b1ff Sets the proper working directory for ESLint 2019-10-21 01:33:38 -07:00
Aleksej Komarov
5521c8ebee [READY] tgui-next: Initial PR, speedy new Air Alarm interface. (#46764)
* Initial tgui-next commit

* Improve dev server, slight changes to layout.

* Add more components, fix dragging, finalize scrubber list

* Complete an air alarm interface.

* Multiple improvements based on feedback

- LabeledList now has a "buttons" prop, where you can put buttons.
- Improved Box and Flex components
- Whole UI is now dimmable if non-interactive
- Basic documentation of components (Box and Flex so far).
- Icon and Box now accept a "color" prop.
- Routing improved in "Layout" component, you can now specify whether an interface is scrollable.

* Less harsh dimming

* Redux, Toasts

- Fixed inconsistent backend updates with Redux.
- Added Toasts which are currently unused, but are functional.

* acclimator + ai airlock ui

* Add a progress bar component, implement resizing

* Fix a zero in title bar

* Add a linter to keep shit tidy, fix danger level mapping, add some more docs

* better ai door interact ui

* final ai airlock interface

* Fix issues with code, enforce hard 120 line length cap, automerge binaries

* Implement hot module reloading

* Fix progress bar, add color support

* Fix ProgressBar baseline alignment issues

* Remove unwanted padding on the bottom of the LabeledList.

* Component improvements

- Fix baseline issues with Button and ProgressBar components
- Box how inherits props from Box
- Atomic colors and Button colors are now auto-generated, all range of colors supported

* Chem Dispenser UI, animated numbers, more style fixes

* Add an IE8 polyfill

* Intermediate state of fixing IE8

* Lots of shimming and general misery

* Fully working old TGUI chainloader for IE8, more pipeline improvements

* Support title-less Sections

* Delete Yarn, use Lerna for workspace management

* Improve maths and animated numbers

* Fix loss of focus for scrollable content, activate buttons with keyboard

* Attempt to bust the cache, grab focus on keyboard presses too

* Fix hot module replacement by manually pulling replaced modules.

* backend logging

 un-nuke line endings

changes without insane line endings

* helper procs + href support

* slight optimization

* compiles

* Redux, Hotkeys, Kitchen Sink (for UI testing), Tabs component

* Push logs to backend, small kitchen sink changes, tab fixes

* Update component reference in README

* Small fixes

* Next bunch of IE8 fixes, PureComponent optimization for Inferno

* Delete old tgui html

* Log the event of loading the old tgui

* Enable tgui logging on server by default

* Final solution

* Extract routes into a separate file, fix ChemDispenser bug

- Chem dispenser was needlessly disabling transfer amount buttons

* Disable baseline alignment for vertical tabs

* Fix tabs and box units

- Tab content was not taking full page width
- Box can now accepts strings as units, which will be treated as raw style values.

* Fix tgui on Terry

* Fix sending all logs with an "error" flag

* Some macro UI component changes and improvements

- Refer to README.md diff to see what's new

* Tooltip component

* Add support for themes, nanotrasen logo is back

* Clockwork theme hotfix

* Slight adjustment to logo positioning

* Actually proper solution for logo positioning

* Fix color maps

* tgui-next thermomachine interface

* tgui-next canister interface

* Add icon_class_name proc to asset cache

* Lots of stuff backported from actioninja's repo

* Cleanup oopsies

* Cargo UI adjustments

* Nuke lodash

* Minor fixes and cleanup

- Remove local Inferno package in favor of upstream Inferno
- Fix "initial" prop on AnimatedNumber
- Force fancy=0 for IE8
- Click-through dimmer

* Add a bat file for dummies

* podlauncher interface fix

* Update README, assert code dominance

* Clarify usage of event handlers in Inferno

* Document LabeledList.Divider

* Fukken grammar

* fixes cellular emporium readapt button not working

* fixes incorrect action on button in atmos control interface

* remove unneeded data from airlock electronics ui

* Set +x mode on bin/tgui

* Fix filename cases

- They were untracked by git on windows

* Ignore package lock, make batch more robust

- package-lock.json is very random and unreliable as fuck. Yarn was better.

* Build tgui-next in travis

* bruh

- fixes tgui error reporting

* logging cleanup + always log
2019-10-15 17:20:37 +02:00
Jordan Brown
154e6abc70 Add vscode extension to use the .editorconfig (#42606)
Vscode doesn't use it by default and considering it's our recommended editor that
seems like an oversight.
2019-01-30 16:36:38 -08:00
Jordan Brown
a994aa6bff Add extensions.json for vscode 2018-12-10 17:31:30 -05:00