Skip to content

Commit f2dfb9f

Browse files
committed
Add section on Leiningen integration
1 parent ea7e8b6 commit f2dfb9f

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

index.adoc

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,9 @@ environment or from command-line options.
16081608
----
16091609

16101610
To run your application, use `clojure -M:duct`, or the `duct` alias
1611-
defined in the <<Project Setup>> section.
1611+
defined in the <<Project Setup>> section. If your project uses
1612+
Leiningen rather than tools.deps, check out the section on <<Leiningen>>
1613+
integration.
16121614

16131615
== Integrations
16141616

@@ -1704,6 +1706,34 @@ kbd:[M-x] `cider-ns-refresh` kbd:[RET]
17041706
There's also a key binding for this command:
17051707
kbd:[C-c] kbd:[M-n] kbd:[r]
17061708

1709+
=== Leiningen
1710+
1711+
It's recommended that you use Duct with `deps.edn`, however it is
1712+
possible to use Duct with Leiningen.
1713+
1714+
To do so, you'll need to update your project file with profile for Duct,
1715+
and an alias to run it:
1716+
1717+
.project
1718+
[,clojure]
1719+
----
1720+
(defproject org.example/app "0.1.0-SNAPSHOT"
1721+
;; the rest of your project file goes here
1722+
:aliases {"duct" ["trampoline" "with-profile" "+duct" "run"]}
1723+
:profiles {:duct {:dependencies [[org.duct-framework/main "0.1.11"]]
1724+
:main duct.main}})
1725+
----
1726+
1727+
Now you can run Duct with:
1728+
1729+
[,shell]
1730+
----
1731+
lein duct
1732+
----
1733+
1734+
Note that the startup time suffers somewhat. In local tests using
1735+
Leiningen increased startup time from 900ms to 1400ms.
1736+
17071737
=== Visual Studio Code
17081738

17091739
https://code.visualstudio.com/[Visual Studio Code] is a popular modern

0 commit comments

Comments
 (0)