Skip to content

Commit 99c5618

Browse files
authored
Add instructions for deps.edn (#189)
* Git-ignore .cpcache * Add instructions for deps.edn [Fixes #179]
1 parent 998e11c commit 99c5618

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DS_Store
33
.cake
44
.calva/repl.calva-repl
5+
.cpcache
56
.lein-deps-sum
67
.lein-failures
78
.nrepl-port

README.md

+40-12
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,49 @@ Currently Marginalia can be used in a number of ways as described below.
2626

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

29-
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`.
30-
With Leiningen 2.x, add `[[lein-marginalia "0.9.2"]]` to the `:plugins` entry in either your project.clj file or your `:user` profile.
29+
With Leiningen 1.x, add `[lein-marginalia "0.9.2"]` to your project.clj's `:dev-dependencies` argument of the
30+
`defproject` function, then run `lein deps`.
31+
32+
With Leiningen 2.x, add `[[lein-marginalia "0.9.2"]]` to the `:plugins` entry in either your project.clj file or your
33+
`:user` profile.
34+
3135
See the [lein-marginalia](https://github.com/clj-commons/lein-marginalia) page for more details.
3236

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

3539
lein marg <options> <files>
3640

41+
### deps.edn
42+
43+
Add `marginalia/marginalia {:mvn/version "0.9.2"}` as a dep. To use it from the command line, do something like
44+
this:
45+
46+
```clojure
47+
{:aliases
48+
{:marginalia
49+
{:extra-deps {marginalia/marginalia {:mvn/version "0.9.2"}}
50+
:main-opts ["-m" "marginalia.main" "-n" "YourProjectName"
51+
"src" "test"]}}}
52+
```
53+
54+
And invoke it with `clojure -M:marginalia`. Without the alias, you could use `clojure -M -m marginalia.main`.
55+
56+
### Invocation
57+
3758
Marginalia accepts options as described below:
3859

39-
* -d --dir Directory into which the documentation will be written (default `docs`)
40-
* -f --file File into which the documentation will be written (default `uberdoc.html`)
41-
* -n --name Project name (if not given will be taken from `project.clj`)
42-
* -v --version Project version (if not given will be taken from `project.clj`)
43-
* -D --desc Project description (if not given will be taken from `project.clj`)
44-
* -a --deps Project dependencies in the form `<group1>:<artifact1>:<version1>;<group2>...` (if not given will be taken from `project.clj`)
45-
* -c --css Additional css resources `<resource1>;<resource2>;...` (if not given will be taken from `project.clj`)
46-
* -j --js Additional javascript resources `<jsfile1>;<jsfile2>;...` (if not given will be taken from `project.clj`)
47-
* -m --multi Generate each namespace documentation as a separate file
48-
* -e --exclude Exclude source file(s) from the document generation process `<file1>;<file2>;...` (if not given will be taken from `project.clj`)
60+
| Flag | | Default | Description |
61+
| ---- | --------- | -------------------- | ----------------------------------------------------------------------------------|
62+
| -d | --dir | `docs` | Directory into which the documentation will be written |
63+
| -f | --file | `uberdoc.html` | File into which the documentation will be written |
64+
| -n | --name | (from `project.clj`) | Project name |
65+
| -v | --version | (from `project.clj`) | Project version |
66+
| -D | --desc | (from `project.clj`) | Project description |
67+
| -a | --deps | (from `project.clj`) | Project dependencies in the form `<group1>:<artifact1>:<version1>;<group2>...` |
68+
| -c | --css | (from `project.clj`) | Additional css resources `<resource1>;<resource2>;...` |
69+
| -j | --js | (from `project.clj`) | Additional javascript resources `<jsfile1>;<jsfile2>;...` |
70+
| -m | --multi | disabled | Generate each namespace documentation as a separate file |
71+
| -e | --exclude | (from `project.clj`) | Exclude source file(s) from the document generation process `<file1>;<file2>;...` |
4972

5073
### Maven
5174

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

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

123+
Marginalia is currently maintained by Tim Macdonald and Sean Corfield.
124+
100125
Notes
101126
-----
102127

@@ -127,6 +152,9 @@ Marginalia is...
127152
- [Frederick Giasson](https://github.com/fgiasson)
128153
- [Michael Bloom](https://github.com/MichaelBlume)
129154
- [Tristan Strange](https://github.com/triss)
155+
- [Sean Corfield](https://github.com/seancorfield)
156+
- [Tim Macdonald](https://github.com/tsmacdonald)
157+
130158
If I've missed your name then please ping me.
131159

132160
License

0 commit comments

Comments
 (0)