From b93f88e47b1678d57c9eb432ef8a66fba3ce137c Mon Sep 17 00:00:00 2001 From: Micah Date: Wed, 26 Feb 2025 14:49:41 -0700 Subject: [PATCH] fixes doc generate to include project name and version in title --- bin/doc.sh | 2 +- deps.edn | 17 ++++++++--------- dev/build.clj | 12 +++++++++++- src/cljvm/speclj/cloverage.clj | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/bin/doc.sh b/bin/doc.sh index 2e04b91..ddad92b 100755 --- a/bin/doc.sh +++ b/bin/doc.sh @@ -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 . diff --git a/deps.edn b/deps.edn index 2f8608f..1e6de26 100644 --- a/deps.edn +++ b/deps.edn @@ -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}"} - } } } diff --git a/dev/build.clj b/dev/build.clj index fba0b64..15e9543 100644 --- a/dev/build.clj +++ b/dev/build.clj @@ -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") @@ -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"})) diff --git a/src/cljvm/speclj/cloverage.clj b/src/cljvm/speclj/cloverage.clj index 401ed84..a1b0baf 100644 --- a/src/cljvm/speclj/cloverage.clj +++ b/src/cljvm/speclj/cloverage.clj @@ -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)