Skip to content

Commit

Permalink
docs: Improve Usage Docs a bit around usage
Browse files Browse the repository at this point in the history
I first thought I needed to run `mix compile.unused` which...
did nothing. So I think this will help folks.

I don't think the dependency and compiler should necessarily
be used on production as well so also added this.

Thanks for your work!
  • Loading branch information
PragTob authored and hauleth committed Jul 27, 2022
1 parent 8f32851 commit a191c46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -36,13 +36,20 @@ defmodule MySystem.MixProject do
# In case of Phoenix projects you need to add it to the list
# compilers: [:unused, :phoenix, :gettext] ++ Mix.compilers()
# ...
#
# If you want to only run it in the dev environment you could do
# it by using `compilers: compilers(Mix.env()) ++ Mix.compilers()`
# instead and then returning the right compilers per environment.
]
end

# ...
end
```

Then you just need to run `mix compile` or `mix compile --force` as usual
and unused hints will be added to the end of the output.

### Warning

This isn't perfect solution and this will not find dynamic calls in form of:
Expand Down

0 comments on commit a191c46

Please sign in to comment.