Sha256: 73fb71bd1c21cf3f2ec954265dfd2ba8c8d4d0720e17fa0ec73444c038545c9b

Contents?: true

Size: 618 Bytes

Versions: 20

Compression:

Stored size: 618 Bytes

Contents

import Alpine from "../base/alpine";
import packageJSON from "@/package.json" assert { type: "json" };
import { registerComponents } from "@helpers/alpine.js";

const Coco = {
  version: packageJSON.version,

  start() {
    if (this._started) {
      throw new Error("Coco has already been started!");
    }

    console.info("Initializing Coco JS", packageJSON.version);

    registerComponents(this._components);

    window.Alpine = Alpine;
    Alpine.start();
  },

  registerComponents(components) {
    this._components.push(...components);
  },

  _components: [],

  _started: false,
};

export default Coco;

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
coveragebook_components-0.19.8 app/assets/js/coco/coco.js
coveragebook_components-0.19.7 app/assets/js/coco/coco.js
coveragebook_components-0.19.6 app/assets/js/coco/coco.js
coveragebook_components-0.19.5 app/assets/js/coco/coco.js
coveragebook_components-0.19.4 app/assets/js/coco/coco.js
coveragebook_components-0.19.3 app/assets/js/coco/coco.js
coveragebook_components-0.19.2 app/assets/js/coco/coco.js
coveragebook_components-0.19.1 app/assets/js/coco/coco.js
coveragebook_components-0.19.0 app/assets/js/coco/coco.js
coveragebook_components-0.18.8 app/assets/js/coco/coco.js
coveragebook_components-0.18.7 app/assets/js/coco/coco.js
coveragebook_components-0.18.0 app/assets/js/coco/coco.js
coveragebook_components-0.17.7 app/assets/js/coco/coco.js
coveragebook_components-0.17.6 app/assets/js/coco/coco.js
coveragebook_components-0.17.5 app/assets/js/coco/coco.js
coveragebook_components-0.17.4 app/assets/js/coco/coco.js
coveragebook_components-0.17.3 app/assets/js/coco/coco.js
coveragebook_components-0.17.2 app/assets/js/coco/coco.js
coveragebook_components-0.17.1 app/assets/js/coco/coco.js
coveragebook_components-0.17.0 app/assets/js/coco/coco.js