Sha256: 7f8a8726fc76e34f2edf63ac071a3c6bda20d72379a90537b86c9cbeb6b286f1

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

import Rails from "@rails/ujs";
import { Application } from "stimulus";
require("react_ujs");

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, component) {
  window[name] = component;
}

export default function startPages () {
  Rails.start();
  for (var name in Components) {
    registerComponent(name, Components[name]);
  }
  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.js";
export { default as copyToClipboard,
         copySupported } from "./lib/copyToClipboard";

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pages_core-3.10.1 app/javascript/index.js
pages_core-3.9.2 app/javascript/index.js
pages_core-3.9.1 app/javascript/index.js
pages_core-3.9.0 app/javascript/index.js
pages_core-3.8.3 app/javascript/index.js
pages_core-3.8.2 app/javascript/index.js