Haru/docs/decisions.md

47 lines
1.4 KiB
Markdown
Raw Normal View History

2021-12-26 01:01:51 +01:00
# Decisions
2021-12-29 16:52:37 +01:00
## Server
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
### Tools
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
- typescript
- static typing
- stricter than normal javascript
- better visual studio (code) support
- drawio
- lighter than png diagrams
- allows for editing the diagrams later
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
### Conventions
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
- file naming
- emulate C# namespacing
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
### Libraries
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
- browserify
- less setup compared to webpack
- node:http
- no additional dependencies
- no overhead from frameworks
- can be modified to the project's specific needs (EFT request have no compression headers, but data is zlib compressed)
- rcedit
- no virus warning after editing the target exe
- ws
- no overhead from frameworks
- no additional dependencies client side
- typescript-eslint
- provides type-specific rules for typescript as well opposed to alternatives
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
### Build
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
- `npm run build` is reserved by VS2022 for it's build task
- nexe cannot include `node_modules` of it's own, so browserify is used to combine it all into one JS file
- browserify doesn't support ES6 modules, so babel is used for transpiling to CommonJS.
- node doesn't include sourcemaps loading support, so we add it in through a babel plugin (`babel-plugin-source-map-support`)
2021-12-26 01:01:51 +01:00
2021-12-29 16:52:37 +01:00
### Lint
2021-12-26 01:01:51 +01:00
2021-12-29 17:05:15 +01:00
- marked `any` explicitly valid to allow for prototyping faster, and turn it off when all EFT types are defined
- turned off `no-inferrable-types` as I want them to be explicitly stated (like in C#)