diff options
| author | eltrac <hi@eltr.ac> | 2026-09-30 15:29:14 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-09-30 15:29:14 +0800 |
| commit | f468b65d371f35578d79dcada0ab4344a8bac987 (patch) | |
| tree | b7ced6381a3a92f2e4fba8fe47663586de460090 /content/article | |
| parent | c5079201b352f714ae6216da8ce2510c89c13bf6 (diff) | |
[draft] new
Diffstat (limited to 'content/article')
| -rw-r--r-- | content/article/clj5.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/content/article/clj5.md b/content/article/clj5.md new file mode 100644 index 00000000..cb65ae1d --- /dev/null +++ b/content/article/clj5.md @@ -0,0 +1,28 @@ ++++ +title = 'Coffee Break Clojure, Vol.5' +subtitle = '管理 Clojure 项目' +slug = '' +tags = [] +categories = '' +date = 2026-09-30T15:06:43+08:00 +draft = true +toc = true ++++ + +在[第一篇](/article/clj1/)我们安装了 Leiningen,当时只是用它启动了 REPL 和 nREPL 服务器,现在我们要用它来干点重活儿了。顺带一提,Leiningen 的名字取自短篇故事《[莱宁根大战蚂蚁](https://en.wikipedia.org/wiki/Leiningen_Versus_the_Ants)》,故事情节…… 就是一个叫莱宁根的男人大战蚂蚁。 + +## 创建项目并引入依赖 + +在终端输入 `lein new -h` 命令查看帮助,可以看到这些模板: + +``` +Subtasks available: +template A meta-template for 'lein new' templates. +plugin A leiningen plugin project template. +default A general project template for libraries. +app An application project template. +``` + +模板只是提供了预先配置好的项目描述文件和项目结构,选哪个都不影响开发。简单来说,如果要写个 Clojure 库就用 `default`,如果要写应用程序就用 `app`。下文用 `app` 做示范。 + + |
