@edx/cohesion-wrapper

0.0.2 • Public • Published

Cohesion Wrapper plugin

This is a plugin to add cohesion script to the head element of Learning MFE

Hosted project

frontend-app-learning::env.config.jsx

import {
  PLUGIN_OPERATIONS,
  DIRECT_PLUGIN,
} from "@openedx/frontend-plugin-framework";
import Plugin from "@edx/cohesion-wrapper";

// Load environment variables from .env file
const config = {
  ...process.env,
  pluginSlots: {
    header_slot: {
      plugins: [
        {
          op: PLUGIN_OPERATIONS.Insert,
          widget: {
            id: "cohesion_wrapper",
            type: DIRECT_PLUGIN,
            priority: 1,
            RenderWidget: Plugin,
          },
        },
      ],
    },
  },
};

export default config;

frontend-app-learning::module.config.js

module.exports = {
  localModules: [
    {
      moduleName: "@edx/cohesion-wrapper",
      dir: "../src/frontend-plugins/packages/cohesion-wrapper",
    },
  ],
};

Readme

Keywords

none

Package Sidebar

Install

npm i @edx/cohesion-wrapper

Weekly Downloads

44

Version

0.0.2

License

AGPL-3.0

Unpacked Size

62.5 kB

Total Files

31

Last publish

Collaborators

  • edx-old-org
  • edx-semantic-release
  • feanil
  • openedx-semantic-release-bot