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

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

Open
tohagan opened this issue Aug 26, 2014 · 1 comment
Open

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

tohagan opened this issue Aug 26, 2014 · 1 comment

Comments

@tohagan
Copy link
Owner

tohagan commented Aug 26, 2014

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
@tohagan
Copy link
Owner Author

tohagan commented Sep 8, 2014

It's likely that plugins will want to use peerDependencies

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant