Skip to content

Bun unterstützt das direkte Hinzufügen von GitHub-Repositories als Abhängigkeiten Ihres Projekts.

sh
bun add github:lodash/lodash

Dies fügt die folgende Zeile zu Ihrer package.json hinzu:

json
{
  "dependencies": {
    "lodash": "github:lodash/lodash"
  }
}

Bun unterstützt eine Reihe von Protokollen zum Angeben von Git-Abhängigkeiten.

sh
bun add git+https://github.com/lodash/lodash.git
bun add git+ssh://github.com/lodash/lodash.git#4.17.21
bun add git@github.com:lodash/lodash.git
bun add github:colinhacks/zod

Hinweis: GitHub-Abhängigkeiten werden nach Möglichkeit über HTTP-Tarball heruntergeladen, um eine schnellere Installation zu ermöglichen.


Siehe Docs > Package Manager für vollständige Dokumentation von Buns Package Manager.

Bun von www.bunjs.com.cn bearbeitet