Adding commonly used dependencies with mix new

Say you use a few dependencies commonly with every project you work on like credo, runtime_tools, etc. Is there a way to pass these as args to mix new in terminal when you’re making a project so you don’t have to manually go into mix.exs after?

Thx

2 Likes

Hi,

did you by any chance find a way to solve the problem? I’m interested in the solution, too.

Thx

1 Like

Mix does not support this, but there is this: https://github.com/pragdave/mix_generator

2 Likes

I’d argue that dependencies are impactful enough that the tedium of adding them manually is worth the cost.

Copying an existing ‘starter pack’ project is something I would do (and do for npm stuff), because it ensures that there’s always a concrete action involved (copy, paste, mix deps.get), and I’d be more likely to maintain this ‘starter pack’ rather than mindlessly start projects with dependencies that I might not need, might be out of date, etc.

1 Like