texas v0.3.3 mix texas.ify
Adds Texas hooks into the current Phoenix application (assumed to be create with mix phx.new
).
This will modify the following files as described, so it is wise to commit your changes prior to
running this command:
./assets/js/app.js
- (addstexasjs
dependency and instantiates a new Texas socket)./lib/<your_app>_web/channels/user_socket.ex
- addsuse Texas.Socket
afteruse Phoenix.Socket
./config/config.exs
- Specifies endpoint and router modules and configures templating engine to compile .texas files./lib/<your_app>_web/router.ex
- Adds theTexas.Plug
to your browser pipeline./lib/<your_app>_web.ex/
- importsTexas.Controller
into your app’s controller template
- ./lib/<your_app>_web/controllers/page_controller.ex
- Renders views with texas_render
- Renames index.html.eex
to index.html.texas
Usage:
mix texas.ify