How do I load an Elixir library into iex without adding it to a project's mix.exs deps?

前端 未结 3 1545
礼貌的吻别
礼貌的吻别 2021-02-01 17:19

I want to tryout the Poison json module without creating a mix project.

How do I install it and make it available in iex via import?

I have been able to add it

3条回答
  •  悲&欢浪女
    2021-02-01 17:47

    Not a direct answer, but another way to maybe achieve what you want:

    You could have a playground project that you generate once (e.g. mix new playground) and that you can then relatively easily add new dependencies to.

    If you do iex -S mix within this project, you'll get all its dependencies.

    If you want to quickly experiment with e.g. Poison at some later point in time, you can just go back into this project.

提交回复
热议问题