问题描述
我想从命令行搜索并安装clojure依赖项.
I would like to search and install clojure dependencies from the commandline.
是否存在一个工具/leiningen命令/lein change
脚本?/...可以:
Does there exists a tool/leiningen command/lein change
script?/... that can:
- 在线搜索clojure库
- 重写
project.clj
以包括依赖关系(最新版本) - 更新依赖项?
- search for clojure libraries online
- rewrite
project.clj
to include the dependency (latest version) - update dependencies?
与 npm install --save
(--save-dev
)和npm search
,对于那些熟悉 npm (JS/Node程序包管理器).
Much along the lines of npm install --save
(--save-dev
) and npm search
, for those that are familiar with npm (JS/Node package manager).
(也许启动提供了更类似于npm的工作流程?)
(Maybe boot provides a more npm-like workflow?)
推荐答案
您可以在其 插件 Wiki页面.
You could find complete list of all Leiningen plugins at its Plugins Wiki page.
我只是浏览了开发工具部分,发现了两个插件可能会让您感兴趣:
I just looked through Development Tools section and found two plugins that may interest you:
- lein-plz -莱宁根插件,用于快速向项目添加依赖项.
- lein-ancient -一个Leiningen插件,用于检查您的项目中是否有过时的依赖项和插件. /li>
- lein-plz - a Leiningen plugin for quickly adding dependencies to projects.
- lein-ancient - a Leiningen plugin to check your project for outdated dependencies and plugins.
以下是使用lein-plz
添加新依赖项的示例(自述文件):
And here is an example of adding new dependencies with lein-plz
(from its Readme):
$ lein plz add core.async cljs data.json
以及使用lein-ancient
更新过时依赖关系的示例(从其自述文件中):
And an example of updating outdated dependencies with lein-ancient
(from its Readme):
$ lein ancient upgrade-profiles [<options>]
这篇关于从命令行管理`project.clj`中的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!