Skip to content

Commit d613214

Browse files
committed
Update Duct main to 0.4.1
Replace --init options with --setup.
1 parent 0375d19 commit d613214

File tree

1 file changed

+39
-48
lines changed

1 file changed

+39
-48
lines changed

index.adoc

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ aliases:
7575
[,clojure]
7676
----
7777
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
78-
org.duct-framework/main {:mvn/version "0.3.2"}}
78+
org.duct-framework/main {:mvn/version "0.4.1"}}
7979
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
8080
----
8181

@@ -85,29 +85,22 @@ Duct can now be run by invoking the `:duct` alias.
8585
----
8686
$ clojure -M:duct
8787
Usage:
88-
clojure -M:duct [--init | --main | --nrepl | --repl | --test]
88+
clojure -M:duct [--main | --nrepl | --repl | --setup KEYS | --test]
8989
Options:
90-
-c, --cider Add CIDER middleware (used with --nrepl)
91-
--init Create a blank duct.edn config file
92-
--init-bb Create a Babashka bb.edn file
93-
--init-calva Create a .vscode/settings.json file for Calva
94-
--init-cider Create a .dir-locals.el Emacs file for CIDER
95-
--init-docker Create a Dockerfile
96-
--init-git Create a .gitignore and initiate Git
97-
-k, --keys KEYS Limit --main to start only the supplied keys
98-
-p, --profiles PROFILES A concatenated list of profile keys
99-
-n, --nrepl Start an nREPL server
100-
-m, --main Start the application
101-
-r, --repl Start a command-line REPL
102-
-s, --show Print out the expanded configuration and exit
103-
-t, --test Run the test suite
104-
--test-config FILE Use a custom test config file
105-
--test-focus ID Limit tests to run only this one
106-
--test-skip ID Skip this test
107-
--test-focus-meta KEY Limit tests to ones with this metadata
108-
--test-skip-meta KEY Skip tests with this metadata
109-
-v, --verbose Enable verbose logging
110-
-h, --help Print this help message and exit
90+
-c, --cider Add CIDER middleware (used with --nrepl)
91+
-k, --keys KEYS Limit --main to start only the supplied keys
92+
-p, --profiles PROFILES A concatenated list of profile keys
93+
-n, --nrepl Start an nREPL server
94+
-m, --main Start the application
95+
-r, --repl Start a command-line REPL
96+
--setup KEYS Run setup scripts (see --setup help)
97+
-s, --show Print out the expanded configuration and exit
98+
-t, --test Run the test suite
99+
--test-config FILE Use a custom test config file
100+
--test-focus ID [] Limit tests to only this ID or metadata ^:key
101+
--test-skip ID [] Skip tests with this ID or metadata ^:key
102+
-v, --verbose Enable verbose logging
103+
-h, --help Print this help message and exit
111104
----
112105

113106
We'll be using this command a lot, so it's recommended that you also
@@ -132,7 +125,7 @@ us.
132125

133126
[,shell]
134127
----
135-
$ duct --init
128+
$ duct --setup :duct
136129
Created duct.edn
137130
----
138131

@@ -293,7 +286,7 @@ Add the dependency:
293286
[,clojure]
294287
----
295288
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
296-
org.duct-framework/main {:mvn/version "0.3.2"}
289+
org.duct-framework/main {:mvn/version "0.4.1"}
297290
org.duct-framework/test {:mvn/version "0.1.0"}}
298291
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
299292
----
@@ -353,7 +346,7 @@ your `deps.edn` file.
353346
[,clojure]
354347
----
355348
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
356-
org.duct-framework/main {:mvn/version "0.3.2"}}
349+
org.duct-framework/main {:mvn/version "0.4.1"}}
357350
:aliases
358351
{:duct {:main-opts ["-m" "duct.main"]}
359352
:test {:extra-deps {org.duct-framework/test {:mvn/version "0.1.0"}}}}}
@@ -393,7 +386,7 @@ We'll first add the new dependency:
393386
[,clojure]
394387
----
395388
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
396-
org.duct-framework/main {:mvn/version "0.3.2"}
389+
org.duct-framework/main {:mvn/version "0.4.1"}
397390
org.duct-framework/test {:mvn/version "0.1.0"}
398391
org.duct-framework/module.logging {:mvn/version "0.6.6"}}
399392
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
@@ -755,7 +748,7 @@ modules: logging and web.
755748
[,clojure]
756749
----
757750
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
758-
org.duct-framework/main {:mvn/version "0.3.2"}
751+
org.duct-framework/main {:mvn/version "0.4.1"}
759752
org.duct-framework/module.logging {:mvn/version "0.6.6"}
760753
org.duct-framework/module.web {:mvn/version "0.13.2"}}
761754
:aliases {:duct {:main-opts ["-m" "duct.main"]}}}
@@ -1105,7 +1098,7 @@ Our project dependencies should now look like this:
11051098
[,clojure]
11061099
----
11071100
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
1108-
org.duct-framework/main {:mvn/version "0.3.2"}
1101+
org.duct-framework/main {:mvn/version "0.4.1"}
11091102
org.duct-framework/module.logging {:mvn/version "0.6.6"}
11101103
org.duct-framework/module.web {:mvn/version "0.13.2"}
11111104
org.duct-framework/module.sql {:mvn/version "0.9.0"}
@@ -1449,7 +1442,7 @@ ClojureScript. As always we begin with our dependencies, and add the
14491442
[,clojure]
14501443
----
14511444
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
1452-
org.duct-framework/main {:mvn/version "0.3.2"}
1445+
org.duct-framework/main {:mvn/version "0.4.1"}
14531446
org.duct-framework/module.cljs {:mvn/version "0.5.2"}
14541447
org.duct-framework/module.logging {:mvn/version "0.6.6"}
14551448
org.duct-framework/module.web {:mvn/version "0.13.2"}
@@ -1657,7 +1650,7 @@ This requires us to once again update the project dependencies:
16571650
----
16581651
{:deps {org.clojure/clojure {:mvn/version "1.12.3"}
16591652
org.duct-framework/client.http {:mvn/version "0.1.0"}
1660-
org.duct-framework/main {:mvn/version "0.3.2"}
1653+
org.duct-framework/main {:mvn/version "0.4.1"}
16611654
org.duct-framework/module.cljs {:mvn/version "0.5.2"}
16621655
org.duct-framework/module.logging {:mvn/version "0.6.6"}
16631656
org.duct-framework/module.web {:mvn/version "0.13.2"}
@@ -1801,7 +1794,7 @@ In your `deps.edn` file, add a Duct alias:
18011794
[,clojure]
18021795
----
18031796
{:aliases
1804-
{:duct {:extra-deps {org.duct-framework/main {:mvn/version "0.3.2"}}
1797+
{:duct {:extra-deps {org.duct-framework/main {:mvn/version "0.4.1"}}
18051798
:main-opts ["-m" "duct.main"]}
18061799
;; rest of your deps.edn
18071800
}}
@@ -1858,12 +1851,11 @@ https://babashka.org/[Babashka] is a fast, native Clojure scripting
18581851
runtime, and it includes a task runner that can be configured with a
18591852
`bb.edn` file.
18601853

1861-
Duct can set up a basic `bb.edn` file for you with the `--init-bb`
1862-
option.
1854+
Duct can set up a basic `bb.edn` file for you with `--setup :bb`.
18631855

18641856
[,shell]
18651857
----
1866-
$ duct --init-bb
1858+
$ duct --setup :bb
18671859
Created bb.edn
18681860
----
18691861

@@ -1891,11 +1883,11 @@ application.
18911883

18921884
To create a Docker container for your Duct application, you will need a
18931885
`Dockerfile` that describes how to build it. Duct will set one up for
1894-
you with the `--init-docker` option.
1886+
you with `--setup :docker`.
18951887

18961888
[,shell]
18971889
----
1898-
$ duct --init-docker
1890+
$ duct --setup :docker
18991891
Created Dockerfile
19001892
----
19011893

@@ -1943,12 +1935,12 @@ https://www.gnu.org/software/emacs/[Emacs] is a popular editor for
19431935
Clojure. https://docs.cider.mx/cider/index.html[CIDER] extends Emacs
19441936
with support for interactive programming in Clojure.
19451937

1946-
To use Emacs/CIDER with Duct, use the `--init-cider` option in your
1947-
project directory.
1938+
To use Emacs/CIDER with Duct, use the `--setup :cider` in your project
1939+
directory.
19481940

19491941
[,shell]
19501942
----
1951-
$ duct --init-cider
1943+
$ duct --setup :cider
19521944
Created .dir-locals.el
19531945
----
19541946

@@ -1980,13 +1972,13 @@ kbd:[C-c] kbd:[M-n] kbd:[r]
19801972
https://git-scm.com[Git] is a version control system that needs no
19811973
introduction.
19821974

1983-
Duct has a `--init-git` option that adds a `.gitignore` file suitable
1984-
for Duct projects. It will also initiate an empty Git repository in the
1985-
current directory if no repository already exists.
1975+
The `--setup :git` command adds a `.gitignore` file suitable for Duct
1976+
projects. It will also initiate an empty Git repository in the current
1977+
directory if no repository already exists.
19861978

19871979
[,shell]
19881980
----
1989-
$ duct --init-git
1981+
$ duct --setup :git
19901982
Created empty Git repository in .git
19911983
Created .gitignore
19921984
----
@@ -2027,7 +2019,7 @@ and an alias to run it:
20272019
(defproject org.example/app "0.1.0-SNAPSHOT"
20282020
;; the rest of your project file goes here
20292021
:aliases {"duct" ["trampoline" "with-profile" "+duct" "run"]}
2030-
:profiles {:duct {:dependencies [[org.duct-framework/main "0.3.2"]]
2022+
:profiles {:duct {:dependencies [[org.duct-framework/main "0.4.1"]]
20312023
:main duct.main}})
20322024
----
20332025

@@ -2047,12 +2039,11 @@ https://code.visualstudio.com/[Visual Studio Code] is a popular modern
20472039
editor, and the https://calva.io/[Calva] plugin gives it full Clojure
20482040
support.
20492041

2050-
To setup Calva for Duct, use the `--init-calva` option in your project
2051-
directory.
2042+
To setup Calva for Duct, use `--setup :calva` in your project directory.
20522043

20532044
[,shell]
20542045
----
2055-
$ duct --init-calva
2046+
$ duct --setup :calva
20562047
Created .vscode/settings.json
20572048
----
20582049

0 commit comments

Comments
 (0)