Skip to content

Commit bef98ad

Browse files
committed
Final documentation tweaks and such
1 parent fe6ccb2 commit bef98ad

File tree

8 files changed

+23
-17
lines changed

8 files changed

+23
-17
lines changed

VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3

build.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
(ns build
44
(:require [clojure.tools.build.api :as build]
5-
[net.lewisship.build :as b]))
5+
[net.lewisship.build :as b]
6+
[clojure.string :as str]))
67

78
(def lib 'io.aviso/pretty)
8-
(def version "1.3")
9+
(def version (-> "VERSION.txt" slurp str/trim))
910

1011
(def jar-params {:project-name lib
1112
:version version})
@@ -35,7 +36,7 @@
3536
(defn publish
3637
"Generate Codox documentation and publish via a GitHub push."
3738
[_params]
38-
(println "Generating Codox documentation")
39+
(println "Generating Codox documentation ...")
3940
(codox nil)
4041
(println "Copying documentation to" publish-dir "...")
4142
(build/copy-dir {:target-dir publish-dir

deps.edn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
criterium/criterium {:mvn/version "0.4.6"}
99
com.stuartsierra/component {:mvn/version "1.1.0"}
1010
com.walmartlabs/test-reporting {:mvn/version "1.2"}
11-
org.clojure/core.async {:mvn/version "1.5.648"}}}
11+
org.clojure/core.async {:mvn/version "1.5.648"}
12+
leiningen/leiningen {:mvn/version "2.9.8"}}}
1213

1314
;; clj -X:dev:test
1415
:test

docs/conf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
# General information about the project.
5050
project = u'io.aviso/pretty'
51-
copyright = u'2013-2019, Aviso'
51+
copyright = u'2013-2022, Aviso'
5252
author = u'Howard M. Lewis Ship and others'
5353

5454
# The version info for the project you're documenting, acts as replacement for
@@ -57,12 +57,11 @@
5757
#
5858

5959
def read_project_version():
60-
f = open("../project.clj")
61-
line = f.readline()
62-
terms = line.split('"')
60+
f = open("VERSION.txt")
61+
version = f.readline().strip()
6362
f.close()
6463

65-
return terms[1]
64+
return version
6665

6766

6867
# The full version, including alpha/beta/rc tags.

docs/lein-plugin.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ of your :file:`project.clj`.
1111
.. code-block:: clojure
1212
1313
(defproject ...
14-
:plugins [[io.aviso/pretty "1.0"]]
14+
:plugins [[io.aviso/pretty "1.3"]]
1515
:middleware [io.aviso.lein-pretty/inject]
1616
:dependencies [...
17-
[io.aviso/pretty "1.0"]]
17+
[io.aviso/pretty "1.3"]]
1818
...)
1919
2020
Adjust the version number for the current version, "|release|".
@@ -31,8 +31,8 @@ Another option is to add the following to your :file:`~/.lein/profiles.clj`:
3131
.. code-block:: clojure
3232
3333
:pretty {
34-
:plugins [[io.aviso/pretty "X.Y.Z"]]
35-
:dependencies [[io.aviso/pretty "X.Y.Z"]]
34+
:plugins [[io.aviso/pretty "1.3"]]
35+
:dependencies [[io.aviso/pretty "1.3"]]
3636
:middleware [io.aviso.lein-pretty/inject]
3737
}
3838
@@ -54,4 +54,3 @@ You may also want to add the following to your :file:`~/.bash_profile`::
5454
alias pretty="lein with-profile +pretty"
5555

5656
At which point, you can use the command ``pretty`` instead of ``lein``.
57-

docs/repl.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,8 @@ another window.
5252
5353
(-> (copy) format-exception paste)
5454
55+
-main
56+
-----
57+
58+
Sets up pretty exceptions before passing arguments to `clojure.main/main`; this is used when starting a REPL
59+
to ensure that pretty exception are enabled before starting to interact.

src/io/aviso/ansi.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
true
99
(catch Throwable _ false)))
1010

11-
(def ^:const ansi-output-enabled?
11+
(def ^:const ^{:added "1.3"} ansi-output-enabled?
1212
"Determine if ANSI output is enabled. If the environment variable ENABLE_ANSI_COLORS is non-null,
1313
then it sets the value: the value `false` (matched caselessly) disables ANSI colors and fonts,
1414
otherwise they are enabled.

src/io/aviso/exception.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"Current set of fonts used in exception formatting. This can be overridden to change colors, or bound to nil
3333
to disable fonts.
3434
35-
~Further, the environment variable DISABLE_DEFAULT_PRETTY_FONTS, if non-nil, will default this to nil.~
35+
Further, the environment variable DISABLE_DEFAULT_PRETTY_FONTS, if non-nil, will default this to nil.
3636
37-
Starting in 1.3, ANSI fonts may be disabled; see [[ansi-output-enabled?]]"
37+
Starting in 1.3, ANSI fonts may be disabled at a lower level; see [[ansi-output-enabled?]]"
3838
(when-not (System/getenv "DISABLE_DEFAULT_PRETTY_FONTS")
3939
default-fonts))
4040

0 commit comments

Comments
 (0)