mirror of
https://github.com/sean2077/obsidian-dynamic-theme-background.git
synced 2026-07-22 06:44:57 +00:00
Extract 6 core services from the monolithic plugin.ts (819→284 lines): - EventBus: unified typed event system replacing 3 ad-hoc notification mechanisms - TimeRuleScheduler: pure time-rule matching and scheduling logic - StyleManager: CSS variable injection, image analysis with size caching - BackgroundManager: lifecycle, timer management, and background selection - BackgroundPersistence: immutable vault file I/O (no longer mutates BackgroundItem) - Logger: centralized logging with consistent prefix Decompose settings-tab.ts (1417→147 lines) into 4 focused sections: - BasicSettingsSection, ModeSettingsSection, BgManagementSection, ApiSettingsSection Additional improvements: - Enable TypeScript strict mode - Pin all devDependency versions for reproducible builds - Template method pattern for provider updateImageCache/deinit/fetchPage - Move safeString() to BaseWallpaperApi, consolidate ID generation - Fix 26 bugs: deleteApi missing deinit, getImages infinite loop, settings-view memory leak, manual mode bounds check, statusBar DOM leak, test API ID collision, rule lookup by .name→.id, DragSort cleanup, perPage ordering, and more
41 lines
1.4 KiB
JSON
41 lines
1.4 KiB
JSON
{
|
|
"name": "obsidian-dynamic-theme-background-plugin",
|
|
"version": "2.8.7",
|
|
"description": "A plugin for Obsidian that dynamically changes the background based on time of day and user settings.",
|
|
"main": "main.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "node esbuild.config.mjs",
|
|
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
|
"fmt": "prettier --write src/**/*.ts",
|
|
"lint": "eslint src --ext .ts",
|
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
"lint:css": "stylelint \"**/*.css\"",
|
|
"fix:css": "stylelint \"**/*.css\" --fix"
|
|
},
|
|
"keywords": [],
|
|
"author": "sean2077",
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"@types/node": "^24.10.1",
|
|
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
"@typescript-eslint/parser": "^8.48.0",
|
|
"all-contributors-cli": "^6.26.1",
|
|
"builtin-modules": "^5.0.0",
|
|
"esbuild": "^0.27.0",
|
|
"eslint": "^9.39.1",
|
|
"eslint-plugin-obsidianmd": "^0.1.9",
|
|
"obsidian": "^1.10.3",
|
|
"prettier": "^3.7.3",
|
|
"stylelint": "^16.26.1",
|
|
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
"stylelint-config-recommended": "^17.0.0",
|
|
"stylelint-config-standard": "^39.0.1",
|
|
"stylelint-order": "^7.0.0",
|
|
"tslib": "^2.8.1",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"dependencies": {
|
|
"jsonpath-plus": "^10.3.0"
|
|
}
|
|
}
|