docs: add Alpine.js migration guide for global() → store() API
Add comprehensive migration documentation for transitioning from the invalid Alpine.global() API to the correct Alpine.store() API. This guide addresses: - Critical issue: Alpine.global() does not exist in Alpine.js v3.15.8 - 26 TypeScript files requiring updates - Step-by-step migration instructions - Template syntax changes (namespace.function() → $store.namespace.function()) - Testing checklist and troubleshooting guide The migration will fix the "p.global is not a function" error currently breaking the theme switcher and all Alpine namespaces. Part 1 of 2 - covers TypeScript and template file updates.
This commit is contained in:
+11
-1
@@ -1,3 +1,6 @@
|
||||
import "./alpine";
|
||||
import { Alpine } from "./alpine";
|
||||
|
||||
import "./admin";
|
||||
import "./api";
|
||||
import "./analytics";
|
||||
@@ -23,7 +26,14 @@ import "./profile";
|
||||
import "./profile-modal";
|
||||
import "./queue";
|
||||
import "./register";
|
||||
import "./register-alpine";
|
||||
import "./search";
|
||||
import "./storage";
|
||||
import "./themeDropdown";
|
||||
import "./theme";
|
||||
import "./toast";
|
||||
import "./toast-error";
|
||||
import "./unlinked_books";
|
||||
import "./woodPanelingInit";
|
||||
import "./woodPaneling";
|
||||
|
||||
Alpine.start();
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
import { Alpine } from "./alpine";
|
||||
// Import all modules that register Alpine globals
|
||||
// These imports trigger their Alpine.global() calls
|
||||
import "./admin";
|
||||
import "./api";
|
||||
import "./analytics";
|
||||
import "./api-explorer-docs";
|
||||
import "./bookshelf";
|
||||
import "./collection-rules";
|
||||
import "./collections";
|
||||
import "./conflicts";
|
||||
import "./custom-section-builder";
|
||||
import "./dashboard";
|
||||
import "./device-management";
|
||||
import "./docs";
|
||||
import "./header";
|
||||
import "./index";
|
||||
import "./library";
|
||||
import "./login";
|
||||
import "./linking";
|
||||
import "./password_validation";
|
||||
import "./profile";
|
||||
import "./profile-modal";
|
||||
import "./queue";
|
||||
import "./register";
|
||||
import "./search";
|
||||
import "./themeDropdown";
|
||||
import "./toast";
|
||||
import "./toast-error";
|
||||
import "./unlinked_books";
|
||||
import "./woodPaneling";
|
||||
// NOW start Alpine after all registrations complete
|
||||
Alpine.start();
|
||||
Reference in New Issue
Block a user