8000 Add instructions for deps.edn by tsmacdonald · Pull Request #189 · clj-commons/marginalia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add instructions for deps.edn #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store
.cake
.calva/repl.calva-repl
.cpcache
.lein-deps-sum
.lein-failures
.nrepl-port
Expand Down
52 changes: 40 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,49 @@ Currently Marginalia can be used in a number of ways as described below.

To use Marginalia with Leiningen add the following code to the project's `project.clj` file:

With Leiningen 1.x, add `[lein-marginalia "0.9.2"]` to your project.clj's `:dev-dependencies` argument of the `defproject` function, then run `lein deps`.
With Leiningen 2.x, add `[[lein-marginalia "0.9.2"]]` to the `:plugins` entry in either your project.clj file or your `:user` profile.
With Leiningen 1.x, add `[lein-marginalia "0.9.2"]` to your project.clj's `:dev-dependencies` argument of the
`defproject` function, then run `lein deps`.

With Leiningen 2.x, add `[[lein-marginalia "0.9.2"]]` to the `:plugins` entry in either your project.clj file or your
`:user` profile.

See the [lein-marginalia](https://github.com/clj-commons/lein-marginalia) page for more details.

Once installed, you can generate your complete source documentation with the command:

lein marg <options> <files>

### deps.edn

Add `marginalia/marginalia {:mvn/version "0.9.2"}` as a dep. To use it from the command line, do something like
this:

```clojure
{:aliases
{:marginalia
{:extra-deps {marginalia/marginalia {:mvn/version "0.9.2"}}
:main-opts ["-m" "marginalia.main" "-n" "YourProjectName"
"src" "test"]}}}
```

And invoke it with `clojure -M:marginalia`. Without the alias, you could use `clojure -M -m marginalia.main`.

### Invocation

Marginalia accepts options as described below:

* -d --dir Directory into which the documentation will be written (default `docs`)
* -f --file File into which the documentation will be written (default `uberdoc.html`)
* -n --name Project name (if not given will be taken from `project.clj`)
* -v --version Project version (if not given will be taken from `project.clj`)
* -D --desc Project description (if not given will be taken from `project.clj`)
* -a --deps Project dependencies in the form `<group1>:<artifact1>:<version1>;<group2>...` (if not given will be taken from `project.clj`)
* -c --css Additional css resources `<resource1>;<resource2>;...` (if not given will be taken from `project.clj`)
* -j --js Additional javascript resources `<jsfile1>;<jsfile2>;...` (if not given will be taken from `project.clj`)
* -m --multi Generate each namespace documentation as a separate file
* -e --exclude Exclude source file(s) from the document generation process `<file1>;<file2>;...` (if not given will be taken from `project.clj`)
| Flag | | Default | Description |
| ---- | --------- | -------------------- | ----------------------------------------------------------------------------------|
| -d | --dir | `docs` | Directory into which the documentation will be written |
| -f | --file | `uberdoc.html` | File into which the documentation will be written |
| -n | --name | (from `project.clj`) | Project name |
| -v | --version | (from `project.clj`) | Project version |
| -D | --desc | (from `project.clj`) | Project description |
| -a | --deps | (from `project.clj`) | Project dependencies in the form `<group1>:<artifact1>:<version1>;<group2>...` |
| -c | --css | (from `project.clj`) | Additional css resources `<resource1>;<resource2>;...` |
| -j | --js | (from `project.clj`) | Additional javascript resources `<jsfile1>;<jsfile2>;...` |
| -m | --multi | disabled | Generate each namespace documentation as a separate file |
| -e | --exclude | (from `project.clj`) | Exclude source file(s) from the document generation process `<file1>;<file2>;...` |

### Maven

Expand Down Expand Up @@ -97,6 +120,8 @@ I would like to thank Zachary Kim for taking a pile of incoherent code and makin

I would also like to thank Justin Balthrop and Brenton Ashworth for their support and code contributions.

Marginalia is currently maintained by Tim Macdonald and Sean Corfield.

Notes
-----

Expand Down Expand Up @@ -127,6 +152,9 @@ Marginalia is...
- [Frederick Giasson](https://github.com/fgiasson)
- [Michael Bloom](https://github.com/MichaelBlume)
- [Tristan Strange](https://github.com/triss)
- [Sean Corfield](https://github.com/seancorfield)
- [Tim Macdonald](https://github.com/tsmacdonald)

If I've missed your name then please ping me.

License
Expand Down
0