Skip to content

Commit

Permalink
Merge branch 'doomspork-installer-favicon'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Jun 9, 2015
2 parents fefa976 + c304745 commit 35025a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions installer/lib/phoenix_new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ defmodule Mix.Tasks.Phoenix.New do
# Embed missing files from Phoenix static.
embed_text :phoenix_js, from_file: Path.expand("../../priv/static/phoenix.js", __DIR__)
embed_text :phoenix_png, from_file: Path.expand("../../priv/static/phoenix.png", __DIR__)
embed_text :phoenix_favicon, from_file: Path.expand("../../priv/static/favicon.ico", __DIR__)

@moduledoc """
Creates a new Phoenix project.
Expand Down Expand Up @@ -238,10 +239,12 @@ defmodule Mix.Tasks.Phoenix.New do
copy_from path, binding, @bare
create_file Path.join(path, "priv/static/js/phoenix.js"), phoenix_js_text()
create_file Path.join(path, "priv/static/images/phoenix.png"), phoenix_png_text()
create_file Path.join(path, "priv/static/images/favicon.ico"), phoenix_favicon_text()
else
copy_from path, binding, @brunch
create_file Path.join(path, "web/static/vendor/phoenix.js"), phoenix_js_text()
create_file Path.join(path, "web/static/assets/images/phoenix.png"), phoenix_png_text()
create_file Path.join(path, "web/static/assets/images/favicon.ico"), phoenix_favicon_text()
end
end

Expand Down
2 changes: 2 additions & 0 deletions installer/test/phoenix_new_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ defmodule Mix.Tasks.Phoenix.NewTest do
# Brunch
assert_file "photo_blog/.gitignore", ~r"/node_modules"
assert_file "photo_blog/web/static/assets/images/phoenix.png"
assert_file "photo_blog/web/static/assets/images/favicon.ico"
assert_file "photo_blog/web/static/vendor/phoenix.js"
assert_file "photo_blog/web/static/js/app.js"
assert_file "photo_blog/web/static/css/app.scss"
Expand Down Expand Up @@ -96,6 +97,7 @@ defmodule Mix.Tasks.Phoenix.NewTest do

assert_file "photo_blog/priv/static/css/app.css"
assert_file "photo_blog/priv/static/images/phoenix.png"
assert_file "photo_blog/priv/static/images/favicon.ico"
assert_file "photo_blog/priv/static/js/phoenix.js"
assert_file "photo_blog/priv/static/js/app.js"

Expand Down
Binary file added priv/static/favicon.ico
Binary file not shown.

0 comments on commit 35025a4

Please sign in to comment.