Summary
Currently, adapt-cli supports installing plugins from:
- Bower registry (default) —
adapt install adapt-contrib-pageLevelProgress
- Local paths —
adapt install /path/to/plugin
- Git clone via bower registry lookup (dev mode) — uses
--dev flag
There is no way to install a plugin directly from a git URL. This is needed for private repos, forks, or plugins not registered in the bower registry.
Proposed Usage
# Install from HTTPS git URL
adapt install https://github.com/user/adapt-my-plugin.git
# Install a specific branch/tag
adapt install https://github.com/user/adapt-my-plugin.git#v2.0.0
adapt install https://github.com/user/adapt-my-plugin.git#develop
# Update re-clones from the stored git URL
adapt update adapt-my-plugin
adapt update # includes git-installed plugins
Only HTTPS URLs are supported (not SSH git@... URLs).
Behaviour
- Install: Clones the repo, reads
bower.json for metadata, checks framework compatibility. Stores _gitUrl, _gitRef, _wasInstalledFromGitRepo in .bower.json.
- Manifest:
adapt.json stores the full git URL (with optional #ref) as the dependency value.
- Update: Re-clones HEAD (default branch), ignoring any originally specified ref. To pin a version, re-install with
adapt install url#ref.
- Version checking: Single-version check against the cloned ref's
bower.json (same as local-path plugins). No multi-version search across git tags.