app/javascript/panda_cms/controllers/index.js in panda_cms-0.6.0 vs app/javascript/panda_cms/controllers/index.js in panda_cms-0.6.1

- old
+ new

@@ -1,28 +1,31 @@ -console.debug("[Panda CMS] Importing Panda CMS Stimulus Controller...");; +console.debug("[Panda CMS] Importing Panda CMS Stimulus Controller...") import { Application as PandaCmsApplication } from "@hotwired/stimulus" const pandaCmsApplication = PandaCmsApplication.start() -console.debug("[Panda CMS] Application started...");; +console.debug("[Panda CMS] Application started...") // Configure Stimulus development experience pandaCmsApplication.debug = false window.pandaCmsStimulus = pandaCmsApplication console.debug("[Panda CMS] window.pandaCmsStimulus available...") console.debug("[Panda CMS] Registering controllers...") -// Grab our internal controllers manually -import { DashboardController } from "controllers/dashboard_controller" +// Grab our internal controllers manually, prefixed with panda_cms_controllers so not to conflict +import { DashboardController } from "panda_cms_controllers/dashboard_controller" pandaCmsApplication.register("dashboard", DashboardController) -import { SlugController } from "controllers/slug_controller" +import { SlugController } from "panda_cms_controllers/slug_controller" pandaCmsApplication.register("slug", SlugController) +import { EditorController } from "panda_cms_controllers/editor_controller" +pandaCmsApplication.register("editor", EditorController) + console.debug("[Panda CMS] Registering components...") // Import and register all TailwindCSS Components or just the ones you need import { Alert, Autosave, ColorPreview, Dropdown, Modal, Tabs, Popover, Toggle, Slideover } from "tailwindcss-stimulus-components" pandaCmsApplication.register('alert', Alert) @@ -33,10 +36,10 @@ pandaCmsApplication.register('popover', Popover) pandaCmsApplication.register('slideover', Slideover) pandaCmsApplication.register('tabs', Tabs) pandaCmsApplication.register('toggle', Toggle) -console.debug("[Panda CMS] Components registered..."); +console.debug("[Panda CMS] Components registered...") export { pandaCmsApplication } -console.debug("[Panda CMS] Application exported..."); +console.debug("[Panda CMS] Application exported...")