forked from practicalli/clojure-cli-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deps.edn
1082 lines (825 loc) · 40.6 KB
/
deps.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;; The deps.edn file describes the information needed to build a classpath.
;; Source: https://github.com/practicalli/clojure-deps-edn
;;
;; deps.edn configuration is a combination of
;; - install-level (latest Clojure version at install time)
;; - user level - $HOME/.clojure/deps.edn
;; - project level - deps.edn in root of project
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
;; In an :alias, only the last :main-opts is kept and others are dropped.
{
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Default Paths
;; Directories to include in the classpath to run the application
;; Development only paths should be defined in aliases, eg. :env/dev
;; Project deps.edn file superceeds this setting
:paths ["src"]
;; End of: Default Paths
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Main dependencies
:deps
;; Clojure standard library
{org.clojure/clojure {:mvn/version "1.10.3"}}
;; End of: Main dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:aliases
{
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; REPL experience
;; Rebel Readline
;; Clojure REPL with syntax highlighting, built in docs and a quit command `:repl/quit`
;; https://github.com/bhauman/rebel-readline
;; clojure -M:repl/rebel
:repl/rebel
{:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-m" "rebel-readline.main"]}
;; ClojureScript REPL - starts the default CLJS repl
;; https://github.com/bhauman/rebel-readline/tree/master/rebel-readline-cljs
;; clojure -M:repl/rebel-cljs
:repl/rebel-cljs
{:extra-deps {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
:main-opts ["-m" "rebel-readline-cljs.main"]}
;; rebel readline with nrepl for editor connection to REPL
;; CIDER: run `cider-connect-clj` and expressions evaluated in rebel
;; are also available from CIDER/Emacs/Spacemacs
;; clojure -M:repl/rebel-nrepl
:repl/rebel-nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"
"-i"
"-f" "rebel-readline.main/-main"]}
;; Run a Clojure repl with reveal and nrepl interactively
;; - see :inspect/reveal* for more reveal aliases
;; clj -M:repl/reveal-nrepl
:repl/reveal-nrepl
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware]"
"-i"]}
;; As with :repl/reveal-nrepl with a light theme and 32 point font
;; Replace font-family with local font (should be slightly faster startup)
;; clj -M:repl/reveal-light-nrepl
:repl/reveal-light-nrepl
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware]"
"-i"]}
;; rebel readline with reveal data visualization
;; clojure -M:repl/rebel-reveal
:repl/rebel-reveal
{:extra-deps
{vlaaad/reveal {:mvn/version "1.1.164"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]
}
;; Development environment
;; Include `dev` directory on the class path
;; Supports the use of `dev/user.clj` to configure REPL startup
;; http://practicalli.github.io/clojure/clojure-tools/configure-repl-startup.html
;; clojure -M:env/dev
:env/dev
{:extra-paths ["dev"]}
;; End of REPL experience
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Alternative REPLs - not tested
;; Clojure Socket REPL on port 50505:
;; clojure -M:repl/socket
:repl/socket
{:jvm-opts ["-Dclojure.server.repl={:port,50505,:accept,clojure.core.server/repl}"]}
;; Clojure Socket REPL on an available port, displaying port number (container/cloud environments)
;; - specify -r to start a repl
:repl/socket-zero
{:jvm-opts ["-Dclojure.server.repl={:port,0,:accept,clojure.core.server/repl}"]
:main-opts ["-e" "(.getLocalPort,(get-in,@#'clojure.core.server/servers,[\"repl\",:socket]))"]}
;; ClojureScript (node) Socket REPL on port 55555:
;; clojure -M:repl/socket-cljs
:repl/socket-node
{:jvm-opts ["-Dclojure.server.repl={:port,55555,:accept,cljs.server.node/repl}"]}
;; ClojureScript (browser) Socket REPL on port 58585:
;; clojure -M:repl/socket-cljs
:repl/socket-browser
{:jvm-opts ["-Dclojure.server.repl={:port,58585,:accept,cljs.server.browser/repl}"]}
;; tubular - socket repl client
;; https://github.com/mfikes/tubular
;; Connect to a socket repl, e.g. :repl/socket
;; clojure -M:repl/socket-client
:repl/socket-client
{:extra-deps {tubular/tubular {:mvn/version "1.4.0"}}
:main-opts ["-m" "tubular.core"
"-p" "55555"]}
;; Start a Clojure Socket pREPL on port 40404:
;; clojure -M:repl/prepl
:repl/prepl
{:jvm-opts ["-Dclojure.server.repl={:port,40404,:accept,clojure.core.server/io-prepl}"]}
;; Start a ClojureScript Socket pREPL on port 44444:
:repl/prepl-cljs
;; clojure -M:repl/prepl-cljs
{:jvm-opts ["-Dclojure.server.repl={:port,44444,:accept,cljs.server.browser/prepl}"]}
;; End of Alternative REPL's
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Creating projects from templates
;; clj-new - https://github.com/seancorfield/clj-new
;; Classic command line
;; clojure -M:project/new luminus practicalli/full-stack-app +http-kit +h2 +reagent +auth
;; Edn command line arguments
;; clojure -X:project/new ;; library project called playground
;; clojure -X:project/new :name practicalli/my-library
;; clojure -X:project/new :template app :name practicalli/my-application
;; clojure -X:project/new :template luminus :name practicalli/full-stack-app +http-kit +h2 +reagent +auth
:project/new
{:replace-deps {seancorfield/clj-new {:mvn/version "1.1.243"}}
:exec-fn clj-new/create
:exec-args {:template lib :name practicalli/playground}
:main-opts ["-m" "clj-new.create"]}
;; ALPHA status: Add 'something' to existing project (subject to change)
:project/add
{:replace-deps {seancorfield/clj-new {:mvn/version "1.1.243"}}
:exec-fn clj-new/generate
:main-opts ["-m" "clj-new.generate"]}
;; End of: Creating projects from templates
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Project compilation and dependencies
;; clj-check - report detailed compilation errors for a project
;; https://github.com/athos/clj-check
;; clojure -M:project/check
:project/check
{:extra-deps {athos/clj-check
{:git/url "https://github.com/athos/clj-check.git"
:sha "cd1f25456de5eebda0a69602dd3445905382b3a4"}}
:main-opts ["-m" "clj-check.check"]}
;; find-deps - fuzzy search Maven & Clojars and add deps to deps.edn
;; https://github.com/hagmonk/find-deps
;; clojure -M:project/find-deps http-kit # fuzzy search for dependency
;; clojure -M:project/find-deps http-kit ring compojure # multiple deps
;; clojure -M:project/find-deps -F:merge http-kit # merge dep into deps.edn file
:project/find-deps
{:extra-deps
{find-deps/find-deps
{:git/url "https://github.com/hagmonk/find-deps"
:sha "9bf23a52cb0a8190c9c2c7ad1d796da802f8ce7a"}}
:main-opts ["-m" "find-deps.core"]}
;; Visualizing dependencies in a project
;; https://github.com/clojure/tools.deps.graph
;; clojure -X:project/graph-deps
:project/graph-deps
{:replace-paths []
:replace-deps {org.clojure/tools.deps.graph {:mvn/version "1.0.56"}}
:main-opts ["-m" "clojure.tools.deps.graph"] ;; deprecated
:ns-default clojure.tools.deps.graph
:exec-fn graph
:exec-args {:output "project-dependencies-graph.png"
:size true}}
;; Dependency version management
;; https://github.com/liquidz/antq
;; Manage versions for maven and git dependencies
;; - report project dependencies that have newer versions available:
;; cd project-directory && clojure -M:project/outdated
;; - update library versions in this deps.edn file:
;; cd ~/.clojure && clojure -M:project/outdated
:project/outdated
{:replace-paths []
:replace-deps {antq/antq {:mvn/version "0.9.3"}}
:main-opts ["-m" "antq.core"]}
:hack/antq
{:replace-deps
{antq/antq {:local/root "/home/practicalli/projects/clojure/community-tools/antq"}}
:main-opts ["-m" "antq.core"]}
;; The classic project for checking maven based dependencies
;; clojure -M:project/outdated-mvn
:project/outdated-mvn
{:replace-paths []
:replace-deps {deps-ancient/deps-ancient {:mvn/version "RELEASE"}}
:main-opts ["-m" "deps-ancient.deps-ancient"]}
;; Carve - search through code for unused vars and remove them
;; clojure -M:project/unused --opts '{:paths ["src" "test"]}'
:project/unused
{:extra-deps {borkdude/carve
{:git/url "https://github.com/borkdude/carve"
:sha "a3a5b941d4327127e36541bf7322b15b33260386"}}
:main-opts ["-m" "carve.main"]}
;; End of: Projects and dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Project Packaging
;; depstar - build jars, uberjars
;; https://github.com/seancorfield/depstar
;; over-ride the :main-class as the name is unlikely to match your project
;; Jar archive of the project
;; clojure -X:project/jar :main-class domain.application
;; clojure -X:project/jar :jar '"project-name.jar"' :main-class domain.application
:project/jar
{:replace-deps {seancorfield/depstar {:mvn/version "2.0.171"}}
:exec-fn hf.depstar/jar
:exec-args {:jar "project.jar"
:aot true}}
;; Uberjar archive of the project, including Clojure runtime
;; clojure -X:project/uberjar :main-class domain.application
;; clojure -X:project/uberjar :jar '"project-name.jar"' :main-class domain.application
:project/uberjar
{:replace-deps {seancorfield/depstar {:mvn/version "2.0.171"}}
:exec-fn hf.depstar/uberjar
:exec-args {:jar "uber.jar"
:aot true}}
;; Depstar changed between version 1.x and 2.x
;; - changed version 1.x aliases to -classic for legacy use
;; - these aliases will be removed in a few months
:project/jar-classic
{:extra-deps {seancorfield/depstar {:mvn/version "1.1.136"}}
:exec-fn hf.depstar/jar
:exec-args {:jar "project.jar"
:aot true
:main-class project.core}}
:project/uberjar-classic
{:extra-deps {seancorfield/depstar {:mvn/version "1.1.136"}}
:exec-fn hf.depstar/uberjar
:exec-args {:jar "uber.jar"
:aot true
:main-class project.core}}
;; uberdeps - uberjar builder
;; https://github.com/tonsky/uberdeps
;; "--target" "target/cdeps-0.1.0.jar" in `:main-opts` to specify output file
;; uberdeps reads deps.edn config once running
:project/uberdeps
{:replace-paths []
:replace-deps {uberdeps/uberdeps {:mvn/version "1.0.4"}}
:main-opts ["-m" "uberdeps.uberjar"]}
;; End of project packaging
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Project Deployment
;; local and remote deployment of Java archives
;; Clojure CLI tools - built in alias to deploy locally (in `~/.m2/`)
;; clojure -X:deps mvn-install
;; deps-deploy - Deploy libraries to Clojars
;; https://github.com/slipset/deps-deploy
;; Deploy to Clojars
;; `clojure -M:project/clojars project.jar`
;; Deploy to Clojars signed
;; `clojure -M:project/clojars-signed project.jar`
;;
;; Set Clojars username/token in `CLOJARS_USERNAME` and `CLOJARS_PASSWORD`
;; environment variables.
;; Set fully qualified artifact-name and version in project `pom.xml` file
:project/clojars
{:replace-paths []
:replace-deps {slipset/deps-deploy {:mvn/version "RELEASE"}}
:main-opts ["-m" "deps-deploy.deps-deploy"
"deploy"]}
:project/clojars-signed
{:replace-paths []
:replace-deps {slipset/deps-deploy {:mvn/version "RELEASE"}}
:main-opts ["-m" "deps-deploy.deps-deploy"
"deploy"
:true]}
;; DEPRECATED - use `clojure -X:deps mvn-install`
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Add the path to the jar for deployment to simplify command
;; :deploy-locally
;; {:extra-deps {deps-deploy/deps-deploy {:mvn/version "RELEASE"}}
;; :main-opts ["-m" "deps-deploy.deps-deploy"
;; "install"
;; "path/to/my.jar"]}
;; {:deploy-clojars
;; {:extra-deps {deps-deploy/deps-deploy {:mvn/version "RELEASE"}}
;; :main-opts ["-m" "deps-deploy.deps-deploy"
;; "deploy"
;; "path/to/my.jar"]}}
;; End of Project Deployment
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Java Sources
;; Look up Java Class and method definitions, eg. `cider-find-var` in Emacs
;; Requires: Java sources installed locally
;; Examples are from Ubuntu package install locations
;; clojure -M:lib/java11-source
:lib/java8-source
{:extra-deps
{openjdk/java-sources {:local/root "/usr/lib/jvm/openjdk-8/lib/src.zip"}}}
:lib/java11-source
{:extra-deps
{openjdk/java-sources {:local/root "/usr/lib/jvm/openjdk-11/lib/src.zip"}}}
;; End of: Java Sources
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Databases and drivers uses only during development
;; H2 embedded database
:database/h2
{:extra-deps {com.h2database/h2 {:mvn/version "1.4.200"}
seancorfield/next.jdbc {:mvn/version "1.1.613"}}}
;; End of Databases and drivers uses only during development
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data inspectors / visualizers
;; Portal
;; Navigate data - edn, json, transit
;; https://github.com/djblue/portal
:inspect/portal-cli
{:extra-deps {djblue/portal {:mvn/version "0.9.0"}}}
:inspect/portal-web
{:extra-deps {djblue/portal {:mvn/version "0.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.773"}}
:main-opts ["-m" "cljs.main"]}
:inspect/portal-node
{:extra-deps {djblue/portal {:mvn/version "0.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.773"}}
:main-opts ["-m" "cljs.main" "-re" "node"]}
;; REBL Data browser
;; https://github.com/practicalli/clojure-deps-edn#cognitect-rebl
;; http://practicalli.github.io/clojure/alternative-tools/clojure-tools/cognitect-rebl.html
;; Requires Clojure 1.10 or greater
;; Requires Cognitect dev-tools https://cognitect.com/dev-tools/index.html
;; :inspect/rebl-java8 (Oracle JDK 8 only)
;; :inspect/rebl (Any JDK 11 distribution - tested with OpenJDK)
:inspect/rebl
{:extra-deps {com.cognitect/rebl {:mvn/version "0.9.241"}
org.clojure/core.async {:mvn/version "1.3.610"}
org.openjfx/javafx-fxml {:mvn/version "11.0.1"}
org.openjfx/javafx-controls {:mvn/version "11.0.1"}
org.openjfx/javafx-swing {:mvn/version "11.0.1"}
org.openjfx/javafx-base {:mvn/version "11.0.1"}
org.openjfx/javafx-web {:mvn/version "11.0.1"}
;; deps for file datafication (REBL 0.9.149 or later)
org.clojure/data.csv {:mvn/version "1.0.0"}
org.clojure/data.json {:mvn/version "1.0.0"}
org.yaml/snakeyaml {:mvn/version "1.27"}}
:main-opts ["-m" "cognitect.rebl"]}
:inspect/rebl-java8
{:extra-deps {com.cognitect/rebl {:mvn/version "0.9.241"}}
:main-opts ["-m" "cognitect.rebl"]}
;; Reveal - read evaluate visualize loop
;; A REPL environment with data visualization and exploration
;; http://practicalli.github.io/clojure/clojure-tools/data-browsers/reveal.html
;; clojure -M:inspect/reveal
;; clojure -X:inspect/reveal
;; Run with theme / font changes:
;; clojure -M:inspect/reveal-light
;; Use with rebel repl by adding and using tap>
;; clojure -M:inspect/reveal:repl/rebel
;; clojure -M:inspect/reveal:rebel -J-Dvlaaad.reveal.prefs='{:theme :light :font-family "Ubuntu Mono" :font-size 32}'
:inspect/reveal
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}}
:ns-default vlaaad.reveal
:exec-fn repl
:main-opts ["-m" "vlaaad.reveal" "repl"]}
:inspect/reveal-light
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}}
:ns-default vlaaad.reveal
:exec-fn repl
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-m" "vlaaad.reveal" "repl"]}
;; rebel readline with reveal data visualization
;; clojure -M:inspect/reveal-rebel
:inspect/reveal-rebel
{:extra-deps
{vlaaad/reveal {:mvn/version "1.3.196"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]}
;; clojure -M:inspect/reveal-light-rebel
:inspect/reveal-light-rebel
{:extra-deps
{vlaaad/reveal {:mvn/version "1.3.196"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]}
;; Not sending all evaluations to Reveal
;; It does send tap> results to Reveal
;; :repl/reveal-rebel-nrepl
;; {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
;; cider/cider-nrepl {:mvn/version "0.25.8"}
;; vlaaad/reveal {:mvn/version "1.3.196"}
;; com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
;; :jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
;; :main-opts ["-m" "nrepl.cmdline"
;; "--middleware" "[cider.nrepl/cider-middleware,vlaaad.reveal.nrepl/middleware]"
;; "-f" "rebel-readline.main/-main"]}
:inspect/reveal-local ;; Hacking the project
{:extra-deps {vlaaad/reveal
{:local/root "/home/practicalli/projects/clojure/visualization/reveal/"}}
:main-opts ["-m" "vlaaad.reveal" "repl"]}
;; Reveal REPL with nrepl server, connect to from a Clojure aware editor
;; clj -M:inspect/reveal-nrepl
:inspect/reveal-nrepl
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware]"]}
;; Light version of :inspect/reveal-nrepl
:inspect/reveal-light-nrepl
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware]"]}
;; Reveal REPL with nrepl server and Emacs CIDER specific middleware
;; Use with `C-u cider-jack-in-clj` or `SPC u , '` on Spacemacs
;; Edit jack-in command: clojure -M:inspect/reveal-nrepl-cider
:inspect/reveal-nrepl-cider
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware,refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}
;; Light version of :inspect/reveal-nrepl-cider
:inspect/reveal-light-nrepl-cider
{:extra-deps {vlaaad/reveal {:mvn/version "1.3.196"}
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:theme,:light,:font-family,\"https://ff.static.1001fonts.net/u/b/ubuntu.mono.ttf\",:font-size,32}"]
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware,refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}
;; End of data browsers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Middleware
;; - start an interactive REPL with a headless nREPL server
;; clojure -M:middleware/nrepl
:middleware/nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}}
:main-opts ["-m" "nrepl.cmdline" "-i"]}
;; Run a REPL using nREPL server for access by cider-connect-clj
;; clojure -M:middleware/cider-clj
:middleware/cider-clj
{:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"]}
:middleware/cider-clj-refactor
{:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}
cider/cider-nrepl {:mvn/version "0.25.8"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}
;; Run a REPL using nREPL server for access by cider-connect-cljs
;; clojure -M:middleware/cider-cljs
:middleware/cider-cljs
{:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}
cider/piggieback {:mvn/version "0.5.2"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}
;; nrebl.middleware - REBL with nREPL server
;; visualize evaluations over nREPL in REBL data browser (CIDER, Calva)
;; https://github.com/RickMoynihan/nrebl.middleware
;; Emacs cider `dir-locals.el` configuration
;; ((clojure-mode . ((cider-clojure-cli-global-options . "-M:lib/cider-nrepl:inspect/rebl:middleware/nrebl"))))
;; clojure -M:lib/cider-nrepl:inspect/rebl:middleware/nrebl
:middleware/nrebl
{:extra-deps {rickmoynihan/nrebl.middleware {:mvn/version "0.3.1"}}
:main-opts ["-e" "((requiring-resolve,'cognitect.rebl/ui))"
"-m" "nrepl.cmdline"
"-i"
"--middleware" "[nrebl.middleware/wrap-nrebl,cider.nrepl/cider-middleware]"]}
;; Supporting aliases for nrebl.middleware
:lib/cider-nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.8"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}}}
;; End of: Middleware
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Clojure Specifications
;; Clojure spec test.check (clojure spec included in Clojure 1.9 onwards)
:lib/spec-test
{:extra-deps
{org.clojure/test.check {:mvn/version "1.1.0"}}}
;; Clojure spec 2 - under active development
;; https://github.com/clojure/spec-alpha2
;; latest commit SHA is returned by the command
;; git ls-remote https://github.com/clojure/spec-alpha2.git refs/heads/master
:lib/spec2
{:extra-deps {org.clojure/spec-alpha2
{:git/url "https://github.com/clojure/spec-alpha2"
:sha "a5ffe8bf89b3095676fb5eb0f4b9fc2828296fba"}}}
;; End of Clojure Specifications
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Testing frameworks
;; Include the test directory as a path used by Clojure CLI tools
:env/test
{:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.0"}}}
;; Expectations test framework
;; https://github.com/clojure-expectations/clojure-test
;; Example usage:
;; clojure -A:expectations:test-runner-cognitect
:lib/expectations
{:extra-deps {expectations/clojure-test {:mvn/version "1.2.1"}}}
;; Classic version not compatible with clojure.test and tools
;; https://github.com/clojure-expectations/expectations
:lib/expectations-classic
{:extra-deps {expectations/expectations {:mvn/version "2.1.10"}}}
;; End of: Testing frameworks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Test runners
;; Cognitect test-runner
;; https://github.com/cognitect-labs/test-runner
:test/cognitect
{:extra-paths ["test"]
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner.git"
:sha "b6b3193fcc42659d7e46ecd1884a228993441182"}}
:main-opts ["-m" "cognitect.test-runner"]}
;; Compiling tests before running - automate Ahead of Time compilation
;; Use the above alias and over-ride the :main-opts on the command line
;; clojure -M:test/cognitect -e "(compile, 'your.namespace)" -m cognitect.test-runner
;; Or use the following alias in your project deps.edn
;;Example only - change to specific namespace in :main-opts before use
:test/cognitect-precompile
{:extra-paths ["test"]
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner.git"
:sha "b6b3193fcc42659d7e46ecd1884a228993441182"}}
:main-opts ["-e" "(compile,'your.namespace-here)"
"-m" "cognitect.test-runner"]}
;; ClojureScript test runner
;; https://github.com/Olical/cljs-test-runner
:test/cljs
{:extra-paths ["test"]
:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}}
:main-opts ["-m" "cljs-test-runner.main"]}
;; kaocha - comprehensive test runner for Clojure/Script
;; tests.edn should be created for each project
;; https://github.com/lambdaisland/kaocha
;; Default test runner using kaocha (change to your own preference)
;; clojure -M:test/runner
:test/runner
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}}
:main-opts ["-m" "kaocha.runner"]}
;; clojure -M:env/test:test/kaocha
:test/kaocha
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}}
:main-opts ["-m" "kaocha.runner"]}
;; clojure -M:test/kaocha-cljs
:test/kaocha-cljs
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}
lambdaisland/kaocha-cljs {:mvn/version "1.0.71"}}
:main-opts ["-m" "kaocha.runner"]}
;; https://github.com/lambdaisland/kaocha-cucumber
;; clojure -M:test/kaocha-cucumber
:test/kaocha-cucumber
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}
lambdaisland/kaocha-cucumber {:mvn/version "0.0.53"}}
:main-opts ["-m" "kaocha.runner"]}
;; https://github.com/lambdaisland/kaocha-junit-xml
;; clojure -M:test/kaocha-junit-xml
:test/kaocha-junit-xml
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}
lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"}}
:main-opts ["-m" "kaocha.runner"]}
;; https://github.com/lambdaisland/kaocha-cloverage
;; clojure -M:test/kaocha-cloverage
:test/kaocha-cloverage
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.732"}
lambdaisland/kaocha-cloverage {:mvn/version "1.0.75"}}
:main-opts ["-m" "kaocha.runner"]}
;; midje-runner
;; https://github.com/miorimmax/midje-runner
;; WARNING: unqualified library name: midje-runner
;; Unqualified names may break soon
:test/midje
{:extra-paths ["test"]
:extra-deps {midge-runner/midje-runner
{:git/url "https://github.com/miorimmax/midje-runner.git"
:sha "ee9c2813e150ae6b3ea41b446b09ba40fc89bdc1"}}
:main-opts ["-m" "midje-runner.runner"]}
;; eftest - fast and pretty test runner
;; There may be a nicer way to do the main-opts - see the Eastwood and kibit issue discussion
;; https://github.com/jonase/eastwood/commit/4d1d05cc6de6ce565207d9a3c86864364f53f006
;; clojure -M:test/eftest
:test/eftest
{:extra-paths ["test"]
:extra-deps {eftest/eftest {:mvn/version "0.5.9"}}
:main-opts ["-e" "(require,'[eftest.runner,:refer,[find-tests,run-tests]]),(run-tests,(find-tests,\"test\"))"]}
;; End of Test runners
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Test Coverage tools
;; Cloverage - Simple clojure coverage tool
;; https://github.com/cloverage/cloverage
;; In the root of your Clojure project, run the command:
;; clojure -M:test/coverage
;; clojure -X:test/coverage
:test/cloverage
{:extra-paths ["test"]
:extra-deps {cloverage/cloverage {:mvn/version "RELEASE"}}
:main-opts ["-m" "cloverage.coverage"
"--src-ns-path" "src"
"--test-ns-path" "test"]
:exec-fn cloverage.coverage/run-project
:exec-args {:src-ns-path ["src"]
:test-ns-path ["test"]}}
;; End of Test Coverage tools
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Linting/ static analysis
;; clj-kondo - comprehensive and fast linter
;; https://github.com/borkdude/clj-kondo/
:lint/kondo
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
:main-opts ["-m" "clj-kondo.main" "--lint" "src"]}
;; Eastwood - classic lint tool
;; https://github.com/jonase/eastwood#running-eastwood-in-a-repl
:lint/eastwood
{:extra-deps {jonase/eastwood {:mvn/version "RELEASE"}}
:main-opts ["-m" "eastwood.lint"
"{:source-paths,[\"src\"],:test-paths,[\"test\"]}"]}
;; kibit - suggest idiomatic use of Clojure
;; https://github.com/jonase/kibit/issues/221
:lint/idiom
{:replace-paths []
:replace-deps {tvaughan/kibit-runner {:mvn/version "1.0.1"}}
:main-opts ["-m" "kibit-runner.cmdline"]}
;; End of Linting/ static analysis
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Visualizing dependencies
;; TODO: review and evaluate
;; :graph {:deps {org.clojure/tools.deps.graph {:mvn/version "0.2.24"}}
;; :main-opts ["-m" "clojure.tools.deps.graph"]}
;; Morpheus - visualize project var relationships
;; https://github.com/benedekfazekas/morpheus
;; Options:
;; -d to specify output directory (this must exist)
;; -f to specify image format, dot (default), png or svg
;; Options are followed by list of paths to analyze.
;; clojure -A:graph-vars -d graphs -f png src test
:graph/vars
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "7f4876ea631a6f5ccee2094d255efd2d1a98ffb6"}}
:main-opts ["-m" "thomasa.morpheus.main"]}
;; Generate PNG image of dependency graph in directory called `graphs`
;; clojure -A:graph-vars-png
:graph/vars-png
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "7f4876ea631a6f5ccee2094d255efd2d1a98ffb6"}}
:main-opts ["-m" "thomasa.morpheus.main"
"-d" "graphs" "-f" "png" "src" "test"]}
;; Generate SVG image of dependency graph in directory called `graphs`
;; clojure -A:graph-vars-svg
:graph/vars-svg
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "d3decebc1cb9ef697cd34781f9cf83d44a071e85"}}
:main-opts ["-m" "thomasa.morpheus.main"
"-d" "graphs" "-f" "svg" "src" "test"]}
;; Visualize connections between library dependencies and project namespaces
;; https://github.com/SevereOverfl0w/vizns
:graph/deps
{:extra-deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "69774e8c29e1c1c691f9922d5c5a6d764374ada3"}}
:main-opts ["-m" "io.dominic.vizns.core"]}
;; Generate single PNG image of library dependencies
:graph/deps-png
{:extra-deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "69774e8c29e1c1c691f9922d5c5a6d764374ada3"}}
:main-opts ["-m" "io.dominic.vizns.core" "single" "-o" "deps-graph.png" "-f" "png"]}
;; Visualizing dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Performance testing
;; Benchmarking library for Clojure
;; https://github.com/hugoduncan/criterium/
;; (require '[criterium.core :refer [bench quick-bench]]) ; require criterium
;; (bench (adhoc-expression)) ; timing of a self contained expression
;;
;; (require '[practicalli/namespace-name]) ; require project source code
;; (in-ns 'practicalli/namespace-name)
;; (quick-bench (project-function args))
:performance/benchmark
{:extra-deps {criterium/criterium {:mvn/version "0.4.6"}}}
;; clj-memory-meter
;; - see https://github.com/clojure-goes-fast/clj-memory-meter
;; - (require '[clj-memory-meter.core :as memory-meter])
;; - (memory-meter/measure (your-expression))
:performance/memory-meter
{:extra-deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version "0.1.3"}}
:jvm-opts ["-Djdk.attach.allowAttachSelf"]}
;; End of Performance testing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Zulip Event announcement
:community/zulip-event
{:replace-paths []
:replace-deps {clojurians-zulip/feeds
{:git/url "https://gitlab.com/clojurians-zulip/feeds.git"
:sha "345a756196d68bde6de0eaa22d217a45f87362b7"}}
:main-opts ["-m" "inclined.main"
"--ns" "clojurians-zulip.events" "--"]}
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Services
;; https://github.com/kachayev/nasus
;; simple zero-configuration command-line HTTP files server. Like Python's SimpleHTTPServer but scalable
:service/webserver
{:replace-deps {nasus/nasus {:mvn/version "0.1.7"}}
:main-opts ["-m" "http.server"]}
;; End of Services
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; EXPERIMENTAL - use at your own risk, you have been warned
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Hot loading dependencies - EXPERIMENTAL / APLPHA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Hot loading is not officially part of tools.deps and
;; this alias could change significantly in future
;; Add new deps to a running REPL:
;; (require '[clojure.tools.deps.alpha.repl :refer [add-libs]])
;; (add-libs 'domain/library {:mvn/version "RELEASE"})
;; Git deps
;; (require '[clojure.tools.gitlibs :as gitlibs])
;; (defn load-master [lib]
;; (let [git (str "https://github.com/" lib ".git")]
;; (add-lib lib {:git/url git :sha (gitlibs/resolve git "master")})))
;; - e.g., using the GitHub path (not the usual Maven group/artifact):
;; (load-master 'clojure/tools.trace)
:alpha/hotload-libs
{:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:sha "d77476f3d5f624249462e275ae62d26da89f320b"