Skip to content

Commit

Permalink
Extract Bamboo.Phoenix (beam-community#581)
Browse files Browse the repository at this point in the history
What changed?
=============

We extract `Bamboo.Phoenix` to a standalone library.

That makes it easier for those who want to use Bamboo but don't want to
depend on Phoenix. Prior to this commit, the Phoenix dependency was
optional. But now, those who want to use `Phoenix`'s rendering engine
can use [`bamboo_phoenix`].

[`bamboo_phoenix`]: https://github.com/thoughtbot/bamboo_phoenix
  • Loading branch information
germsvel authored and farhan.amin committed Aug 19, 2022
1 parent 83f028e commit f52dc1b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 463 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,11 @@ examples.

## Using Phoenix Views and Layouts

Phoenix is not required to use Bamboo. However, if you do use Phoenix, you can
use Phoenix views and layouts with Bamboo. See [`Bamboo.Phoenix`].
Phoenix is not required to use Bamboo. But if you want to use Phoenix's views
and layouts to render emails, see [`bamboo_phoenix`] and [`Bambooo.Phoenix`].

[`bamboo_phoenix`]: https://github.com/thoughtbot/bamboo_phoenix
[`Bambooo.Phoenix`]: https://hexdocs.pm/bamboo_phoenix/Bamboo.Phoenix.html

## Viewing Sent Emails

Expand Down
328 changes: 0 additions & 328 deletions lib/bamboo/phoenix.ex

This file was deleted.

6 changes: 0 additions & 6 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule Bamboo.Mixfile do
elixir: "~> 1.6",
source_url: @project_url,
homepage_url: @project_url,
compilers: compilers(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test, "coveralls.circle": :test],
elixirc_paths: elixirc_paths(Mix.env()),
Expand All @@ -26,9 +25,6 @@ defmodule Bamboo.Mixfile do
]
end

defp compilers(:test), do: [:phoenix] ++ Mix.compilers()
defp compilers(_), do: Mix.compilers()

# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
Expand Down Expand Up @@ -57,8 +53,6 @@ defmodule Bamboo.Mixfile do
{:mime, "~> 1.4"},
{:ex_machina, "~> 2.4", only: :test},
{:cowboy, "~> 1.0", only: [:test, :dev]},
{:phoenix, "~> 1.1", optional: true},
{:phoenix_html, "~> 2.2", only: :test},
{:excoveralls, "~> 0.13", only: :test},
{:floki, "~> 0.29", only: :test},
{:ex_doc, "~> 0.23", only: :dev},
Expand Down
2 changes: 0 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"mochiweb": {:hex, :mochiweb, "2.15.0", "e1daac474df07651e5d17cc1e642c4069c7850dc4508d3db7263a0651330aacc", [:rebar3], [], "hexpm", "b960d1cbcf40a30963eeee90ab7aeae074cbfa9a238561fb4434add1afc3075c"},
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
"parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"},
"phoenix": {:hex, :phoenix, "1.3.3", "bafb5fa408d202e8d9f739e781bdb908446a2c1c1e00797c1158918ed55566a4", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm", "8bde28268d88de0c3141da0945ee2da93bd33473f94e19305dcf174a8dd42bac"},
"phoenix_html": {:hex, :phoenix_html, "2.11.2", "86ebd768258ba60a27f5578bec83095bdb93485d646fc4111db8844c316602d6", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2fe8543036a9cb2103efe26c18874512dc0e005afba60dbfe90aa56e27c198a2"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.0.2", "bfa7fd52788b5eaa09cb51ff9fcad1d9edfeb68251add458523f839392f034c1", [:mix], [], "hexpm", "6f9193364c5de86b85e8d3a80294a134aecf6c5618adcbae668608749e00a7f7"},
"plug": {:hex, :plug, "1.6.0", "90d338a44c8cd762c32d3ea324f6728445c6145b51895403854b77f1536f1617", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm", "b6761cce9b0e369eb3d19da7f8805c1a55e0a7fdc2f65e2fc3802e9305481dea"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"},
Expand Down
Loading

0 comments on commit f52dc1b

Please sign in to comment.