diff --git a/README.md b/README.md index bd60f26..48f2df9 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,44 @@ A command line tool in Haskell to identify unused code. ![Image of Unused Output](http://i.giphy.com/3oEjHGgyV2EDdy1Ogw.gif) +## Installing + +### Homebrew + +You can install [my formulae] via [Homebrew] with `brew tap`: + +```sh +brew tap joshuaclayton/formulae +``` + +Next, run: + +```sh +brew install unused +``` + +[my formulae]: https://github.com/joshuaclayton/homebrew-formulae +[Homebrew]: http://brew.sh/ + +Alternatively, you can install by hand. + +### Stack + +This project uses [Haskell] and [Stack]. + +Once you have these tools installed: + +```sh +stack setup +stack install +``` + +This will generate a binary in `$HOME/.local/bin`; ensure this directory is in +your `$PATH`. + +[Haskell]: https://www.haskell.org +[Stack]: http://www.haskellstack.org + ## Using Unused `unused` reads from a pipe expecting a series of tokens to search the codebase @@ -28,20 +66,7 @@ navigate to a directory, run `unused`, and everything works as expected. Unused leverages [Ag](https://github.com/ggreer/the_silver_searcher) to analyze the codebase; as such, you'll need to have `ag` available in your -`$PATH`. - -## Building and Compiling - -This project uses Haskell and Stack. - -Once you have these tools installed: - -```sh -stack install -``` - -This will generate a binary in `$HOME/.local/bin`; ensure this directory is in -your `$PATH`. +`$PATH`. This is set as an explicit dependency in Homebrew. ## Testing