diff --git a/docs/uberdoc.html b/docs/uberdoc.html index c3b9db02..abe11e21 100644 --- a/docs/uberdoc.html +++ b/docs/uberdoc.html @@ -2866,7 +2866,69 @@ }; })(SyntaxHighlighter);
dependencies
| (this space intentionally left almost blank) | ||||||||||||||||||
A new way to think about programs+dependencies
| (this space intentionally left almost blank) | ||||||||||||||||||
+ | (ns leiningen.marg) | ||||||||||||||||||
Support eval-in-project in both Leiningen 1.x and 2.x. + | (defn eval-in-project + [project form init] + (let [[eip two?] (or (try (require 'leiningen.core.eval) + [(resolve 'leiningen.core.eval/eval-in-project) + true] + (catch java.io.FileNotFoundException _)) + (try (require 'leiningen.compile) + [(resolve 'leiningen.compile/eval-in-project)] + (catch java.io.FileNotFoundException _)))] + (if two? + (eip project form init) + (eip project form nil nil init)))) | ||||||||||||||||||
+ | (def dep ['marginalia "0.9.1"]) | ||||||||||||||||||
+ | (defn- add-marg-dep [project] + ;; Leiningen 2 is a bit smarter about only conjing it in if it + ;; doesn't already exist and warning the user. + (if-let [conj-dependency (resolve 'leiningen.core.project/conj-dependency)] + (conj-dependency project dep) + (update-in project [:dependencies] conj dep))) | ||||||||||||||||||
Note:+ +The docstring for the marg function is used by Leiningen when a
+user types | |||||||||||||||||||
Run Marginalia against your project source files. + +Usage: + +
+
+Marginalia accepts options as described below: + +-d --dir Directory into which the documentation will be written (default -f --file File into which the documentation will be written (default -n --name Project name (Taken from -v --version Project version (Taken from -D --desc Project description (Taken from -a --deps Project dependencies in the form -c --css Additional css resources -j --js Additional javascript resources -m --multi Generate each namespace documentation as a separate file + | (defn marg + [project & args] + (eval-in-project (add-marg-dep project) + `(binding [marginalia.html/*resources* ""] + (marginalia.core/run-marginalia (list ~@args))) + '(require 'marginalia.core))) | ||||||||||||||||||
A new way to think about programsWhat if your code and its documentation were one and the same? @@ -3669,7 +3731,7 @@The one true way | (defmulti ns-kw-mm identity) (defmethod ns-kw-mm ::foo [_] :problem-cases.general/foo) (defmethod ns-kw-mm :user/foo [_] :user/foo) -(defmethod ns-kw-mm :foo [_] :foo) | ||||||||||||||||||