What is a pluggable package and an EntryPoint?
masterA pluggable package is a collection of one or more entry points. An EntryPoint is an object that contributes specific functionality to the application.
Key characteristics:
- An
EntryPointmust implement theEntryPointinterface fromrepluggable. - It typically includes a
nameand anattach()method used to inject functionality. - Packages can be separate npm projects or part of the main application.
- Packages can be plugged in or out at runtime.
import { EntryPoint } from 'repluggable'
export const Foo : EntryPoint = {
name: 'FOO',
attach() {
console.log('FOO is here!')
}
}