bonfire-networks / iconify_ex

Iconify
30 stars 6 forks source link

Problems on umbrella app #6

Open gabrielmancini opened 10 months ago

gabrielmancini commented 10 months ago

Hello Fellows,

My phoenix project is a umbrella project, so i have the project folder tree in this shape:

~/
~/mix.exs
~/apps
~/apps/myproject
~/apps/myproject_xxx
~/apps/myproject_web
~/config
~/deps

and the config must be something like this:

config :iconify_ex,
  mode: :set,
  generated_icon_static_path: "./apps/myproject_web/priv/static/images/icons",
  generated_icon_static_url: "/images/icons"

and i run the mix phx.server in ~/ folder all works fine because it creates

, but it creates an folder structure inside all my apps like:

~/apps/myproject_web/priv/static/images/icons # <-- the right one, and the follow wrongs
~/apps/myproject_web/apps/myproject_web/priv/static/images/icons
~/apps/myproject_xxx/apps/myproject_xxx/priv/static/images/icons
~/apps/myproject/apps/myproject/priv/static/images/icons

anybody have any tip for me to change something and send a PR to this?

mayel commented 10 months ago

As a workaround (though of course a fix would be welcome!), you can simply put something like this in your config:


umbrella_root = File.cwd!()

config :iconify_ex,
  generated_icon_modules_path: "#{umbrella_root}/lib/components/icons",
  generated_icon_static_path: "#{umbrella_root}/assets/static/images/icons"