Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamvery/phoenix_ratchet
Phoenix Template Engine for Ratchet
https://github.com/iamvery/phoenix_ratchet
elixir phoenix ratchet template-engine view
Last synced: 3 months ago
JSON representation
Phoenix Template Engine for Ratchet
- Host: GitHub
- URL: https://github.com/iamvery/phoenix_ratchet
- Owner: iamvery
- License: mit
- Created: 2016-05-19T13:29:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T04:00:03.000Z (over 7 years ago)
- Last Synced: 2024-09-18T14:10:48.436Z (5 months ago)
- Topics: elixir, phoenix, ratchet, template-engine, view
- Language: Elixir
- Homepage:
- Size: 54.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Phoenix Ratchet
[![Build Status][travis-img]][travis] [![Hex Version][hex-img]][hex]
[travis-img]: https://travis-ci.org/iamvery/phoenix_ratchet.svg?branch=master
[travis]: https://travis-ci.org/iamvery/phoenix_ratchet
[hex-img]: https://img.shields.io/hexpm/v/phoenix_ratchet.svg
[hex]: https://hex.pm/packages/phoenix_ratchetA [Phoenix][phoenix] template engine for [Ratchet][ratchet].
View the [Documentation][docs].
## Usage
1. Install with Hex:
```elixir
def deps do
[{:phoenix_ratchet, "~> 0.4"}]
end
```1. Configure Phoenix in `config/config.exs` to use the Ratchet engine:
```elixir
config :phoenix, :template_engines,
ratchet: Ratchet.Phoenix.Engine
```1. Configure Phoenix in `config/dev.exs` to live reload Ratchet templates:
```diff
config :blurg, Blurg.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{web/views/.*(ex)$},
- ~r{web/templates/.*eex$}
+ ~r{web/templates/.*(eex|ratchet)$}
]
]
```An example project can be found at [iamvery/example-ratchet-app][example].
## Release
1. Bump the version in `mix.exs`.
1. Add version to CHANGELOG.
1. Commit version with Git tag `vX.X.X`.
1. Publish to Hex```
$ mix do hex.publish, hex.publish docs
```[phoenix]: http://www.phoenixframework.org/
[ratchet]: https://github.com/iamvery/ratchet
[example]: https://github.com/iamvery/example-ratchet-app
[docs]: https://hexdocs.pm/phoenix_ratchet