Skip to content

Commit

Permalink
doc: add other build tools section to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jbwheatley committed Feb 12, 2025
1 parent 0771b40 commit 1d684e4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

"Take this shovel to dig in source code history for changes to specific methods and functions."

* [Getting Started](#getting-started)
* [Usage](#usage)
* [Use with other build tools (Mill, Bazel)](#use-with-other-build-tools-mill-bazel)
* [Background](#background)

## Getting Started

`sbt-codeshovel` is available through Maven Central.
Expand Down Expand Up @@ -39,6 +44,26 @@ shovel shared/src/main/scala/pact4s/StateChanger.scala handle 68 HEAD
A `.html` file will then be produced and placed in the `/target` directory (e.g. `/target/shovel-handle-68-HEAD.html`). Opening this in your
browser will allow you to browse the git history for the supplied method. [Check the example here.](./doc/example.html)

## Use with other build tools (Mill, Bazel)

The core functionality of codeshovel is released as its own standalone library to be used with other build tools:

```scala
"io.github.jbwheatley" %% "codeshovel" % xxx
```

The method `codeshovel.Execution.run` can be used to produce the html document:

```scala
run(
repositoryName = "pact4s",
baseDir = "/Users/jbwheatley/pact4s",
filePath = "shared/src/main/scala/pact4s/StateChanger.scala",
functionName = "handle",
startLine = 68,
startCommitName = "HEAD"
)
```

## Background

Expand Down

0 comments on commit 1d684e4

Please sign in to comment.