在elixir中,如何在全球安装软件包? [英] In elixir, How do i install packages globally?

查看:97
本文介绍了在elixir中,如何在全球安装软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用mix在全球安装某些软件包吗?我想要类似 npm 的全局选项或 gem 的安装之类的行为-它可能对软件包有用我到处都使用 csv yaml

Can I use mix to install some packages globally? I'd like a behaviour like npm's global option or gem's install - it could be useful for packages I use everywhere like csv or yaml.

推荐答案

Elixir中没有这样的东西,您总是在项目的上下文中使用依赖项。诸如存档或脚本之类的解决方案旨在解决特定问题,它们不允许项目之间共享软件包。

There is no such thing in Elixir, you always use dependencies in the context of a project. Solutions like archives or escripts are meant to solve specific problems, they do not allow package sharing between projects.

但是,无需担心共享经常使用的软件包。包管理器Hex已经缓存了这些文件,它将为您处理。

However, there is no need to worry about sharing frequently used packages. Hex, the package manager, already cache those and it will take care of handling it for you.

这篇关于在elixir中,如何在全球安装软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆