Sha256: d5debbf7d8bcf409c00cfc30c4d3ad1e0e6f43e3f545ecf084c3af9eec3d39ee

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

import { start as startRails } from "@rails/ujs";
import { Application } from "@hotwired/stimulus";
import "react_ujs";
import { FC } from "react";

import * as Components from "./components";

import EditPageController from "./controllers/EditPageController";
import MainController from "./controllers/MainController";
import LoginController from "./controllers/LoginController";
import PageOptionsController from "./controllers/PageOptionsController";

import RichText from "./features/RichText";

export function registerComponent(name: string, component: FC) {
  window[name] = component;
}

export default function startPages() {
  startRails();
  for (const name in Components) {
    registerComponent(name, Components[name] as FC);
  }
  RichText.start();

  const application = Application.start();
  application.register("edit-page", EditPageController);
  application.register("main", MainController);
  application.register("login", LoginController);
  application.register("page-options", PageOptionsController);
}

export * from "./components";
export * from "./hooks";
export * from "./stores";

export * from "./lib/request";
export {
  default as copyToClipboard,
  copySupported
} from "./lib/copyToClipboard";

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pages_core-3.13.0 app/javascript/index.ts
pages_core-3.12.7 app/javascript/index.ts
pages_core-3.12.6 app/javascript/index.ts
pages_core-3.12.5 app/javascript/index.ts