We are provided with several standard mix tasks out of the box and even though helpful to get kickstarted, after experienced usage I would like to customize certain aspects such as:
- Not having comments included when doing
mix new new_app
- Generating one’s own umbrella app folder structure
- Being able to define a specific mix task to compile one’s custom project skeleton as defined under point 2.
I would appreciate if someone could point me out where those
mix tasks are defined and if not trivial, how to modify them according to one’s personal taste.
EDIT: Here is a direct link to mix task
For the project relates tasks you can specify aliases in your mix file.
For mix new I have a shell script which does call mix new and then processes the generated files. I do not strip comments, but I add some standard deps to the mix file and install them.
I’d suggest to keep comments anyway, if not for you then at least for contributors or your future self. Comments are far more than wasted disk space, they are instructions and letters to your future self.
Thank you for pointing me in the desired direction. I will be looking at: https://hexdocs.pm/mix/Mix.html
As far as the feedback about commenting goes, I respectfully disagree though. There is a difference between documenting code and having documentation on the usage of a new framework/language primarily catered towards beginners. The latter tends to become noisy.
Well even beginners may want to contribute to your project. And it might help them to have these brief instructions. If you still find that they don’t suite your style, you always can create a new project which provides your version of the
Mix.Task.Ajwah.New, build an archive from it, install that archive.