@@ -8,6 +8,7 @@ James Reeves
8
8
:sectnums:
9
9
:toc: left
10
10
:url-repo: https://github.com/duct-framework/duct-framework.github.io
11
+ :experimental:
11
12
12
13
IMPORTANT: Duct is currently in beta. This means *breaking changes* are
13
14
possible but unlikely, and *bugs* are possible and likely.
@@ -221,7 +222,7 @@ Hello World
221
222
:resumed
222
223
----
223
224
224
- You can also use the Alt-E hotkey instead of typing `(reset)`.
225
+ You can also use the kbd:[ Alt-E] hotkey instead of typing `(reset)`.
225
226
226
227
The configuration defined by `duct.edn` can be accessed with `config`,
227
228
and the running system can be accessed with `system`.
@@ -1518,3 +1519,43 @@ used in this example for the sake of brevity.
1518
1519
1519
1520
Now that we have both a server and client, we can `(reset)` the REPL
1520
1521
and check the web application at: <http://localhost:3000>
1522
+
1523
+ == Development
1524
+
1525
+ === Emacs
1526
+
1527
+ https://www.gnu.org/software/emacs/[Emacs] is a popular editor for
1528
+ Clojure. https://docs.cider.mx/cider/index.html[CIDER] extends Emacs
1529
+ with support for interactive programming in Clojure.
1530
+
1531
+ To use Emacs/CIDER with Duct, use the `--init-cider` option in your
1532
+ project directory.
1533
+
1534
+ [,shell]
1535
+ ----
1536
+ $ duct --init-cider
1537
+ Created .dir-locals.el
1538
+ ----
1539
+
1540
+ This creates a hidden file, `.dir-locals.el`, that sets up CIDER with
1541
+ Duct-specific options. To connect to the project using CIDER, open a
1542
+ file in the project (such as `duct.edn`) and type:
1543
+ kbd:[M-x] `clojure-jack-in` kbd:[RET]
1544
+
1545
+ TIP: The '`M`' in kbd:[M-x] means '`meta`' and is often bound to the
1546
+ kbd:[Alt] key. '`C`' usually means kbd:[Ctrl].
1547
+
1548
+ Once CIDER has connected, you can open a REPL with: kbd:[C-c] kbd:[C-z]
1549
+
1550
+ This works in a similar way to the command-line REPL. To start up Duct,
1551
+ you can use the `(go)` command:
1552
+
1553
+ ----
1554
+ user> (go)
1555
+ ----
1556
+
1557
+ To reset the project, you can use `(reset)` at the REPL, or type:
1558
+ kbd:[M-x] `cider-ns-refresh` kbd:[RET]
1559
+
1560
+ There's also a key binding for this command:
1561
+ kbd:[C-c] kbd:[M-n] kbd:[r]
0 commit comments