clojure - 莱宁根是否有等同于 `clj -m`

标签 clojure leiningen

Leiningen 中是否有与此 clj 命令等效的命令:

clj -m project.core

看起来如果我使用 Leiningen,我需要先创建 project.clj,然后才能运行它

lein run -m project.core

我可以在不创建 project.clj 的情况下运行它吗?

*没有project.clj文件的项目示例: https://github.com/mogenslund/microliquid

最佳答案

这似乎是不可能的。我试过运行像

这样的命令
lein run -m test/-main

我得到的错误是 suggest it can't find a main .翻看lein help , 几乎所有东西,包括 lein clean 之类的东西, 如果 project.clj 则抛出错误没有找到。

tutorial for leiningen是 block :

Leiningen works with projects. A project is a directory containing a group of Clojure (and possibly Java) source files, along with a bit of metadata about them. The metadata is stored in a file named project.clj in the project's root directory, which is how you tell Leiningen about things like

...

Most Leiningen tasks only make sense in the context of a project. Some (for example, repl or help) can also be called from any directory.

强调我的。

似乎 leiningen 是以项目为中心的,并且期待在 project.clj 中保存的元数据。发挥作用。

关于clojure - 莱宁根是否有等同于 `clj -m`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56820564/

相关文章:

clojure - leiningen new 抛出异常

clojure - lein 导致 jline3 终端变得愚蠢

maven - Maven 本地存储库与 leiningen 的依赖关系

eclipse - 在 Mac 上设置良好的 Clojure

import - 我无法在 clojure/midje 中运行测试

scala - Clojure REPL 和 Scala REPL 有什么区别?

clojure - 为什么以下 clojure core.logic 表达式不返回任何解决方案? `(run* [a b] (== {:a b} {a :b}))`

clojure 规范 fdef 不起作用 - 在传递递归定义时

logging - 带有 logback 的 clj-http 日志记录

deployment - 构建和部署 Clojure 应用程序的最佳实践 : good tutorials?