taku_oka
taku_oka

Reputation: 453

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

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.

Upvotes: 12

Views: 3276

Answers (1)

Szymon Jeż
Szymon Jeż

Reputation: 8449

Try:

iex -S mix run -e "DribbbleGif.main"

Upvotes: 13

Related Questions