简体   繁体   English

等效于npm install-以十六进制混合保存在elixir中

[英]What is equivalent to npm install --save in elixir mix with hex

Is there an equivalent to npm install --save for quick adding hex module to mix.exs ? 是否有等效于npm install --save用于将十六进制模块快速添加到mix.exs?

I know pasting hex module references do mix.exs deps function like this: 我知道粘贴十六进制模块引用确实可以这样mix.exs deps函数:

defp deps do
    [
        {:asn, "~> 0.2.1"},
        {:mix_docker, "~> 0.3.0"}
    ]
  end

shouldn't be a big deal, but I've got accustomed to convention 没什么大不了的,但是我已经习惯了约定

npm install --save xyz 

and the module is downloaded and installed in packages.json configuration file. 并下载了该模块并将其安装在packages.json配置文件中。 Very handy. 非常便利。

No, there is no such thing. 不,没有这样的事情。 You need to add dependencies manually to your mix.exs . 您需要手动将依赖项添加到mix.exs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM