Skip to content
This repository was archived by the owner on Feb 13, 2020. It is now read-only.
This repository was archived by the owner on Feb 13, 2020. It is now read-only.

Add 'plugin' support for custom commands and config options. #44

@tohagan

Description

@tohagan

Node and cli-config makes plugin support a no-brainer ...

  • We might add this into cli-config or implement it as a separate npm package.
  • TODO: Review other npm plugin support packages

Implementation Ideas

  1. Add plugins property in .stlive.json
    • maps new top level commands to a node package called using cli-config interface.
    • plugins: { "mycmd": "npm-package", ... }
  2. Publish plugins as new npm packages.
    • Package names start with stlive- prefix and are registered with the 'stlive' keyword.
  3. [sudo] stlive plugins install
    • Creates plugins folder
    • Generates plugins/index.js and plugins/packages.json from config.plugins .
    • Runs npm install in plugins folder
  4. [sudo] stlive plugins update regenerates files and runs npm update in plugins folder.
  5. stlive [help] [cmd ...] - sets config.help = true and calls command function
    • Command functions should now display usage help when config.help === true.
  6. stlive plugins list - Lists configured plugins
  7. stlive plugins index - Opens https://www.npmjs.org/browse/keyword/stlive

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions