Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 2.78 KB

File metadata and controls

48 lines (39 loc) · 2.78 KB

Developer documentation

Project structure

dir purpose note
quickbar/ Links for players to copy into their quickbars ⚠️
launch/ Script launchers. Quickbar links point here. Used for cache control. ⚠️
dist/ Compiled scripts ⚠️
build/ Stuff needed to build script launchers, compiled scripts, and quickbar links
conf/ Configuration
src/ToolSetup/ Modules that set up tools, to be used by launchers and compiled scripts
src/ToolDoc/ Plaintext documentation about what the tools do
src/ToolDebug/ Debug processes for each tool; used by the bug reporter
src/Models/ Modules containing only domain logic. If it touches the DOM, it doesn't belong here.
src/Scrape/ Modules to search the DOM for various data needed. These often return Models.
src/Prompt/ Modules that pop open some kind of fancy prompt, when window.prompt isn't good enough. Any non-presentation logic should be handled via callbacks or similar (meaning: the logic doesn't go in these modules!)
src/Transform/ Modules that transform existing stuff in the DOM. E.g. adding extra columns to a table
src/Widget/ Modules that spawn some standalone UI component, which could be inserted anywhere into the DOM
src/Util/ Miscellaneous singletons and procedures. Maybe this won't be a thing after some refactoring.
test/data/ Sampled data from the game, to test against
test/unit/ Unit tests for modules in src/
docs/player/ Documentation about the tools, for players
docs/developer/ Technical documentation
vendor/ External libraries, which tools depend on

⚠️ Everything in these dirs is automatically built. Any changes you make will be lost.
You shouldn't need to change anything in these dirs.

How to install

Make sure you have nodejs installed.

  1. copy conf/host.example to conf/host
  2. edit conf/host
  3. cd to the project root
  4. npm install

How to build

You'll most likely want to rebuild after changing anything in src/

  1. cd to the project root
  2. npm run build

How to test

  1. cd to the project root
  2. npm run test

Currently, tests can only be ran if twcheese is in your drive root (/twcheese/). But there's a workaround. See ES Module Resolution for details.