File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 63
63
:extra-deps {org.clojure/tools.namespace {:mvn/version " 1.1.0" }
64
64
cli-matic/cli-matic {:mvn/version " 0.4.3" }}}
65
65
66
- :apply-import-vars {:extra-deps {metosin/malli {:mvn/version " 0.3.0" }}
66
+ :apply-import-vars {:extra-deps {metosin/malli {:mvn/version " 0.3.0" }
67
+ io.aviso/pretty {:mvn/version " 0.1.36" }}
67
68
:ns-default lread.apply-import-vars}
68
69
69
70
; ;
Original file line number Diff line number Diff line change 3
3
(ns lread.apply-import-vars
4
4
(:require [clojure.java.io :as io]
5
5
[clojure.string :as string]
6
+ [io.aviso.ansi :as ansi]
6
7
[malli.core :as m]
8
+
7
9
[malli.error :as me]
8
10
[malli.util :as mu]
9
11
; ; use internal nses instead of exported nses, we are generating exported nses.
208
210
stale-cnt (->> (process-templates )
209
211
(reduce (fn [stale-cnt {:keys [template-filename target-filename changed?]}]
210
212
(println " Template:" template-filename)
211
- (println (if changed? " X" " " ) " Target:" target-filename (if changed? " STALE" " (no changes)" ))
213
+ (println (if changed? " X" " " ) " Target:" target-filename (if changed?
214
+ (-> " STALE" ansi/bold-red-bg ansi/black)
215
+ " (no changes)" ))
212
216
(if changed? (inc stale-cnt) stale-cnt))
213
217
0 ))]
214
218
(println (format " \n %d of %d targets are stale." stale-cnt (count templates)))
219
223
update-cnt (->> templates
220
224
(reduce (fn [update-cnt {:keys [template-filename target-filename changed? target-clj]}]
221
225
(println " Template:" template-filename)
222
- (println " Target:" target-filename (if changed? " UPDATE" " (no changes detected)" ))
226
+ (println " Target:" target-filename (if changed?
227
+ (-> " UPDATE"
228
+ ansi/bold-green-bg
229
+ ansi/black)
230
+ " (no changes detected)" ))
223
231
(if changed?
224
232
(do
225
233
(spit target-filename target-clj)
You can’t perform that action at this time.
0 commit comments