1.1.1 • Published 6 months ago

@magnolia/cli-plugin-template v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

PluginTemplate

The PluginTemplate serves as an abstract base class. It provides a structured approach to handle and define plugins.

Overview

Every plugin in the CLI system extends the PluginTemplate, which ensures consistent structure and functionality. The abstract class prescribes a common interface for all plugins, providing mandatory fields and functions each plugin must implement.

These include crucial information about the plugin, such as the plugin's name, version, and description, as well as fundamental operations like start(), stop(), and init() method for initializing logger passed from the MGNL CLI.

Purpose

The goal of the PluginTemplate is to create a standardized, straightforward process for handling plugins. It simplifies the plugin creation process by providing a clear framework and enables the CLI to interact with diverse plugins in a consistent manner.

At this point, we are not yet providing details on how to create a custom plugin. More information on that will be shared in later updates.

Changelog

Version 1.1.1

  • add the usage optional property

Version 1.1.0

  • add the init() method to pass a logger from the MGNL CLI to log errors and other information that occurs during the runtime of the plugin
  • remove the help() method