View Source Escript.Example (nexus v0.3.0)
This is an example on how to use Nexus
with an
escript application.
After defined :escript
entry into your project/0
function
on mix.exs
and set the main_module
option, you can safely
define your commands as usual with defcommand/2
, CLI config
and handlers.
Then you need to call parse/0
macro, which will inject both
parse/1
and run/1
function, which the latter you can delegate
from the main/1
escript funciton, as can seen below.