Update DEVELOPMENT.md

This commit is contained in:
Tetrakern 2024-12-09 02:31:51 +01:00
parent 939013dd06
commit 177630f367

View File

@ -129,19 +129,21 @@ font-size: clamp(1.35em, 1vw + 18.4px, 1.75em); // CSS
## JavaScript
~~Fictioneer is built on [Vanilla JS](http://vanilla-js.com/) without hard dependencies, *especially* not jQuery which is to be avoided like the plague. Bad enough that WordPress and most plugins insist on the performance hog. If you need something from an external library, just copy the functions and credit the source. Avoid additional overhead. There is also an argument for refactoring the JS into classes and modules. But since everything is already working, this would be a labor of passion without immediate benefit.~~
As of 5.27.0, the theme uses [Stimulus](https://stimulus.hotwired.dev/). This section will be updated in the future.
Fictioneer is built on [Vanilla JS](http://vanilla-js.com/) and [Stimulus](https://stimulus.hotwired.dev/) (5.27.0+). It has no other hard dependencies, *especially* not jQuery which is to be avoided like the plague. Bad enough that WordPress and most plugins insist on the performance hog. If you need something from an external library, just copy the functions and credit the source. Avoid additional overhead. There is also an argument for refactoring the JS into classes and modules. But since everything is already working, this would be a labor of passion without immediate benefit.
### Libraries
* [Diff-Match-Patch](https://github.com/google/diff-match-patch)
* [Stimulus](https://stimulus.hotwired.dev/)
### Shorthands
### Shorthands & Objects
* `_$()` for `document.querySelector()`
* `_$$()` for `document.querySelectorAll()`
* `_$$$()` for `document.getElementById()`
* `FcnUtils` contains utility functions
* `FcnGlobals` contains global variables
* `window.FictioneerApp.Controllers` contains singleton Stimulus Controllers
### Custom Events