ソースを参照

docs: add and edit a bunch of subdir readmes

Sven 10 ヶ月 前
コミット
12a1768711

+ 9 - 6
src/README.md

@@ -1,11 +1,14 @@
-## Src
+## src/
 This directory contains the entire runtime code for the userscript.  
 
 <br>
 
 ### Subdirectories
-- [Dev](./dev/) - Contains random development files and notes that aren't included in the final build of the userscript
-- [Features](./features/) - Contains the code for all the separate features themselves
-- [Menu](./menu/) - Contains the code for the userscript's different menus
-- [Tools](./tools/) - Contains helper tools for building and developing the userscript
-- [Utils](./utils/) - Contains helper utilities that are used in the userscript's code itself
+- [components](./components/) - Contains all of the UI components that are used throughout the userscript and plugins
+- [dev](./dev/) - Contains random development files and notes that aren't included in the final build of the userscript
+- [dialogs](./dialogs/) - Contains all BytmDialog instances that manage almost all of BetterYTM's dialogs
+- [features](./features/) - Contains the code for all the separate features themselves
+- [menu](./menu/) - Contains the (somewhat legacy) config menu code
+- [stories](./stories/) - Contains [Storybook](https://storybook.js.org/) stories for developing UI components
+- [tools](./tools/) - Contains helper tools for building and developing the userscript
+- [utils](./utils/) - Contains helper utilities that are used in the userscript's code itself

+ 4 - 0
src/components/README.md

@@ -0,0 +1,4 @@
+## src/components/
+This directory contains all the different UI components of the userscript.  
+They typically come as a function that returns an HTMLElement.  
+They are also exposed on the plugin interface, so that third party scripts can use them.

+ 1 - 1
src/dev/README.md

@@ -1,2 +1,2 @@
-## Dev
+## src/dev/
 This directory contains random development files and notes that aren't included in the final build of the userscript.

+ 2 - 2
src/dialogs/README.md

@@ -1,3 +1,3 @@
-## Dialogs
-This directory contains the code of all the different dialog menus of the userscript.  
+## src/dialogs/
+This directory contains the code of all the different modal dialogs of the userscript.  
 All of these are built using the BytmDialog class.  

+ 2 - 2
src/features/README.md

@@ -1,4 +1,4 @@
-## Features
+## src/features/
 This directory contains the code of the userscript features themselves. The files are organized by category.  
 Each feature has an initialization function that is called when the userscript is initialized.  
-In the long term most features should have a cleanup function that should be called when the feature config is changed.
+In the long term most features should have a cleanup function that should be called when the feature config is changed so they also inherently support hot-reloading.

+ 4 - 4
src/menu/README.md

@@ -1,4 +1,4 @@
-## Menu
-This directory contains the code of all the different menus of the userscript.  
-All of them are jankily built with JS directly (with `document.createElement()`) and there's lots of repeated code.  
-In the long term all of these will be built with the BytmDialog class and put in the `dialogs` directory.
+## src/menu/
+This directory contains the code of the now somewhat legacy config menu.  
+It's jankily made to barely work in conjunction with the new BytmDialog instances.  
+To be fully compatible and reduce developer overhead in the long term it will need to be migrated sooner or later, probably as part of a bigger config menu overhaul.

+ 1 - 1
src/stories/README.md

@@ -1,2 +1,2 @@
-## Stories
+## src/stories/
 This folder contains stories for developing and testing components, see https://storybook.js.org/docs/get-started

+ 1 - 1
src/tools/README.md

@@ -1,3 +1,3 @@
-## Tools
+## src/tools/
 This directory contains helper tools for building and developing the userscript.  
 They aren't used inside the actual code itself.

+ 2 - 2
src/utils/README.md

@@ -1,2 +1,2 @@
-## Utils
-This directory contains helper utilities that are used in the userscript's code itself.
+## src/utils/
+This directory contains tons of helper functions and classes that are used extensively throughout the userscript's code and plugins.