-
-
Save jwarlander/d4d44132354a0dae13f1d5b47ef2c2c6 to your computer and use it in GitHub Desktop.
A tiny escript repository on the gist: https://elixirforum.com/t/cant-find-the-module-in-the-escript-made-by-one-mix-exs-file-at-runtime/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.CLI do | |
def main(_args) do | |
IO.puts("Hello from MyApp!") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :my_app, | |
version: "0.0.1", | |
elixirc_paths: ["."], | |
escript: escript()] | |
end | |
def escript do | |
[main_module: MyApp.CLI] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're on Elixir 1.4+, you can install using: