Class Plugin

A base class to create Visua CLI plugins

Hierarchy
  • Plugin
Index
Properties
Methods
Properties
Static

options

options: OptionsMap

Plugin command line options map

If your plugin uses some options you should override this property to return a non-empty OptionsMap. For example if your plugin accepts two options:

  • optOne, a boolean flag
  • optTwo, a comma-separated list of strings

The corresponding implementation of options would be:

static options: OptionsMap = {
    optOne: Boolean,
    optTwo: (value: string) => value.split(','),
};
Methods
Abstract

run

  • run(styleMap: StyleMap, options: object): any
  • The entry point of the plugin called by the CLI after the options have been initialized

    Parameters
    • styleMap: StyleMap

      The StyleMap Visua generated from the loaded identity css files

    • options: object

      The initialized plugin options

      • [key: string]: any
    Returns any