Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ilc-plugins-sdk

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ilc-plugins-sdk

This package provides interfaces & base classes for ILC plugins developers

  • 2.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

SDK for ILC plugins development

NPM package NPM downloads

SDK intended for use by developers that build plugins for Isomorphic Layout Composer.

Installation

$ npm i ilc-plugins-sdk

Plugins naming convention

In order to be discoverable by ILC plugin manager - NPM package that contains plugin should be named in one of the following ways:

  • ilc-plugin-* Example: ilc-plugin-myreporting
  • @*/ilc-plugin-* Example: @myorg/ilc-plugin-myreporting

Installation of the plugin

In order to use ILC with installed plugins we recommend extending base Docker image in the following way:

ARG ilc_version=latest
FROM namecheap/ilc:${ilc_version}

RUN npm i ilc-plugin-yourpluginname

# Need to rebuild ILC if your plugin has browser implementation
RUN npm run build

Supported plugin types

Server side plugins

Plugins of this type should provide single entry point for the server implementation. It will be detected via main property in your package.json.

Reporting plugin

Should implement IlcReportingPlugin interface. Allows customizing logs output of the ILC container and optionally set custom behaviour for request ID generation & handling.

I18n params detection plugin

Should implement I18nParamsDetectionPlugin interface.

Isomorphic plugins

Plugins of this type should provide 2 entry points, for the server & browser side respectively. Server side entrypoint will be detected via main property in your package.json. While entrypoint for a browser side implementation expected to be in browser.js file in the root folder of NPM package.

Same approach should be used to fetch necessary interfaces for the server & browser side implementation:

Server side:

import { TransitionHooksPlugin } from 'ilc-plugins-sdk';

Browser side:

import { TransitionHooksPlugin } from 'ilc-plugins-sdk/browser';
Transition hooks plugin

Allows to set up route change hooks which may:

  • Prevent routing & display some UI.
  • Perform the redirect to another page.
  • Allow route change.

Should implement TransitionHooksPlugin interface for the browser & server side.

FAQs

Package last updated on 23 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc