Mix script for templates?

Just curious – Say, I need to use a template phoenix project for future - the present one has sass configured. no npm. and so on.

Can I automate this template generation via mix script?

For example : It’d be nice if I could generate this template for my future projects via mix phx.new sass-starter

How about a shell script and a patch file?

  • Run mix phx.new with some params,
  • git apply some.patch,
  • Wrap it with a Bash script.
2 Likes