Skip to content

Commit bb5deda

Browse files
committed
improved handling of sources when building the static library. Allows for scenic to be in a 'poncho' app configuration
1 parent f260247 commit bb5deda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/scenic/assets/static.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,10 @@ defmodule Scenic.Assets.Static do
466466

467467
# build the file data and metas from the sources
468468
library =
469-
case opts[:sources] do
470-
nil -> [{opts[:otp_app], @default_src_dir}, {:scenic, "deps/scenic/assets"}]
471-
srcs -> srcs
472-
end
469+
opts
470+
|> Keyword.get(:sources, [])
471+
|> Keyword.put_new(opts[:otp_app], @default_src_dir)
472+
|> Keyword.put_new(:scenic, "deps/scenic/assets")
473473
|> Enum.reduce(library, &build_from_source(&2, &1, dst))
474474

475475
# add the default aliases

0 commit comments

Comments
 (0)