Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start "iex" with loading app, and run command in 1 line

Tags:

elixir

I want to do auto build like "gulp.js" in Node.js.

$ iex -S mix -e 'DribbbleGif.main'

** (Mix) Cannot implicitly pass flags to default mix task, please invoke instead: mix run

I want to do this in 1 line command.

  1. load app
  2. start "iex"
  3. do function (DribbbleGif.main)

Because, finally I want to watch file like this.

chokidar **/*.exs **/*.ex -c 'iex -S mix -e 'DribbbleGif.main''


If you have other solution for auto build, please tell me it.

like image 240
taku_oka Avatar asked Jul 30 '15 08:07

taku_oka


1 Answers

Try:

iex -S mix run -e "DribbbleGif.main"
like image 145
Szymon Jeż Avatar answered Oct 13 '22 11:10

Szymon Jeż