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/