Skip to content

Commit

Permalink
fixes doc generate to include project name and version in title
Browse files Browse the repository at this point in the history
  • Loading branch information
slagyr committed Feb 26, 2025
1 parent bf3c0b5 commit b93f88e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bin/doc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh

clj -X:test:codox
clj -T:build docs
pushd doc
git checkout gh-pages # To be sure you're on the right branch
git add .
Expand Down
17 changes: 8 additions & 9 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
:extra-paths ["dev" "spec/clj" "spec/cljc" "spec/cljs" "spec/cljvm" "target/classes"]}
:spec {:main-opts ["-m" "speclj.main" "-c"]}
:cljs {:main-opts ["-m" "speclj.dev.cljs"]}
:build {:extra-deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}
clj-commons/pomegranate {:mvn/version "1.2.24"}}
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}
clj-commons/pomegranate {:mvn/version "1.2.24"}
codox/codox {:mvn/version "0.10.8"}
leiningen-core/leiningen-core {:mvn/version "2.11.2"}
cloverage/cloverage {:mvn/version "1.2.4"}
trptcolin/versioneer {:mvn/version "0.1.1"}
org.clojure/tools.namespace {:mvn/version "1.5.0"}}
:ns-default build
:extra-paths ["dev"]}
:extra-paths ["dev" "target/classes"]}
:cov {:main-opts ["-m" "cloverage.coverage" "--runner" ":speclj" "-p" "src/clj" "-p" "src/cljc" "-p" "src/cljvm" "-s" "spec/clj" "-s" "spec/cljc" "-s" "spec/cljs" "-s" "spec/cljvm" "-e" "leiningen.spec" "--foo" "bar"]}
:codox {:extra-deps {codox/codox {:mvn/version "0.10.8"}}
:exec-fn codox.main/generate-docs
:exec-args {:source-paths ["src/clj" "src/cljc" "src/cljvm"]
:output-path "doc"
:source-uri "https://github.com/slagyr/speclj/blob/master/{filepath}#L{line}"}
}
}
}
12 changes: 11 additions & 1 deletion dev/build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
(:require [cemerick.pomegranate.aether :as aether]
[clojure.java.shell :as shell]
[clojure.string :as str]
[clojure.tools.build.api :as b]))
[clojure.tools.build.api :as b]
[codox.main :as codox]))

(def lib-name "speclj")
(def group-name "speclj")
Expand Down Expand Up @@ -68,3 +69,12 @@
(jar nil)
(println "deploying " (:coordinates deploy-config))
(aether/deploy deploy-config))

(defn docs [_]
(codox/generate-docs
{:source-paths ["src/clj" "src/cljc" "src/cljvm"]
:output-path "doc"
:source-uri "https://github.com/slagyr/speclj/blob/master/{filepath}#L{line}"
:name "Speclj"
:version version
:description "TDD/BDD framework for Clojure"}))
2 changes: 1 addition & 1 deletion src/cljvm/speclj/cloverage.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
;; Assumes that cloverage is already in the classpath.

(defmethod coverage/runner-fn :speclj [_opts]
(prn "_opts: " _opts)
;(prn "_opts: " _opts)
(fn [nses]
(let [results (atom [])
runner (standard/->StandardRunner (atom []) results)
Expand Down

0 comments on commit b93f88e

Please sign in to comment.