PhxCustomTemplate
An opinionated template to create phoenix apps, using live view and tailwind.
Prerequisites
You'll need to install the mix_templates and mix_generator packages by Dave Thomas
mix archive.install hex mix_templates
mix archive.install hex mix_generatorInstall
Install the phx_custom_template using the following command:
mix template.install hex phx_custom_templateUsage
mix gen phx_custom_template project
Then go to into the project created and execute the following commands:
cd project
mix deps.get # get elixir dependencies
cd assets
yarn # install assets if you prefer npm just run; npm install
cd - # go back to the project root directory
iex -S mix phx.server # start the serverPlease note you can easy remove the Example LiveView:
-
lib/
project_web/live/example.exremove this file -
lib/
project_web/templates/layout/app.html.eexremove the line with the pattern <%= *Web.Live.Example %>
Remember replace project with the name of your project.
Created: 2019-09-22