Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snapchat/dagger-browser
Simple tool for browsing Dagger graphs generated via an SPI plugin
https://github.com/snapchat/dagger-browser
android dagger java
Last synced: about 19 hours ago
JSON representation
Simple tool for browsing Dagger graphs generated via an SPI plugin
- Host: GitHub
- URL: https://github.com/snapchat/dagger-browser
- Owner: Snapchat
- License: bsd-3-clause
- Created: 2020-01-13T21:08:05.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T17:21:53.000Z (8 months ago)
- Last Synced: 2024-04-15T00:18:47.966Z (7 months ago)
- Topics: android, dagger, java
- Language: TypeScript
- Homepage:
- Size: 1.66 MB
- Stars: 312
- Watchers: 9
- Forks: 18
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Dagger Browser
Dagger Browser is a progressive web app for easily navigating a project's Dagger graph. The graph data is populated from a Dagger [SPI](https://dagger.dev/spi.html) plugin, and the browser is built using
[CRA (create-react-app)](https://github.com/facebook/create-react-app) with Typescript.## Trying a sample
The [plugin/sample](plugin/sample)
directory contains a fork of a [simple example](https://github.com/google/dagger/tree/master/examples/simple) from the Dagger repo.You can run `./run.sh` to generate the dagger components manifest for this example and display in the Dagger Browser.
## Using Dagger Browser in your app
To build a Dagger Browser site for your project, you'll need to generate json files for your project's Dagger components.
To get started:
1. Look up the latest version of the processor plugin in Maven Central:
2. Add a dependency on `com.snap.daggerbrowser:daggerbrowser-processor` to any Gradle modules in your project that process Dagger components:
```groovy
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
kapt "com.snap.daggerbrowser:daggerbrowser-processor:LATEST_VERSION"
}
```
3. Build your project. The plugin will generate json files for each Dagger component.4. Use [scripts/mkmanifest.sh](https://github.com/Snapchat/dagger-browser/blob/master/scripts/mkmanifest.sh) to aggregate the component json files into a ComponentsManifest.json.
5. Open a Dagger Browser instance, and drag-and-drop your ComponentsManifest.json file to load it.
6. Alternatively, build a Dagger Browser instance from source. Checkout out the `dagger-browser` project
```
$: git clone [email protected]:Snapchat/dagger-browser.git
```
7. Build Dagger Browser using your generated json files:
```
cd dagger-browser
./run.sh ../my_project/
```