Skip to content

Support installing plugins directly from git URLs #237

@taylortom

Description

@taylortom

Summary

Currently, adapt-cli supports installing plugins from:

  1. Bower registry (default) — adapt install adapt-contrib-pageLevelProgress
  2. Local pathsadapt install /path/to/plugin
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions