Project file structure - is it possible to have app.exs and mix.exs files only?

Is it possible to have app.exs and mix.exs files only ? no lib config or test folders ?

All I need is to use some dependencies and one app.exs file :slight_smile:

I wouldn’t see why not. Why do you ask, were you getting an error?

Well, after removing the lib folder a default mix wont find anything to compile anymore.

One needs to set the :elixirc_paths through the project/0 function in the mix.exs file.

def project do
  [
    …
    elixirrc_paths: ["."]
  ]

Should work. But to be honest, it will recursively go down into deps and _build folders. Do yourself a favor and stick to lib even for single file projects.

4 Likes