Fixes #5: Refactor code quality - Part 1
- Split index.js from 1,567 lines to 456 lines (73% reduction)
- Extracted settings event listeners to src/systems/ui/settingsListeners.js
- Extracted settings panel to src/core/settingsPanel.js
- Simplified initUI() and main initialization block
- Modularized style.css into 28 logical CSS modules in src/styles/
- Added build script (npm run build:css) to concatenate modules
- Modules: panel, components, user-stats, info-box, thoughts, settings,
themes, modals, mobile, inventory, quests, equipment, encounters,
weather, music-player, FAB widgets, strip widgets, etc.
- Updated package.json with build:css script and type: module
No functional changes - pure refactoring for maintainability.
This commit is contained in:
+4
-2
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"name": "rpg-complanion-sillytavern",
|
||||
"name": "rpg-companion-sillytavern",
|
||||
"version": "3.7.4",
|
||||
"description": "",
|
||||
"description": "RPG Companion extension for SillyTavern",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build:css": "node scripts/build-css.js",
|
||||
"validate_locale": "node src/i18n/validator.js --watch",
|
||||
"validate_locale_once": "node src/i18n/validator.js"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user