Is it possible to use a local mix project as a hex dependency?
With Bundler I could add a line like:
gem 'action_subscriber', :path => "../action_subscriber"
so that I could try out using the gem before I published a new version. Is this possible with the hex dependency management tool?
Publishing a package to Hex consists of registering a Hex user, adding metadata to the project's mix. exs file, and finally submitting the package with a mix task.
Hex is a package manager for the BEAM ecosystem, any language that compiles to run on the BEAM VM, such as Elixir and Erlang, can be used to build Hex packages. Hex consists of the HTTP API, this website, the repository serving packages and indexes, HexDocs, the Mix build-tool integration, and other services.
Yes it is. In your mix.exs
, you can list the dependency with the :path
keyword (very similarly to what you do with gems).
def dependencies do [{:testing_dep, path: "/Users/me/testing_dep"}] end
You can read a list of all the supported options (e.g., pulling the dependency from GitHub or from a Git repository) in the documentation for the mix deps
task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With