Last active
October 4, 2017 11:43
-
-
Save niku/9be74fbcdb5d2b9e36b4259fe85e08a8 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