Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multi phoenix umbrella apps #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrejj
Copy link

@andrejj andrejj commented Apr 16, 2021

Support multi phoenix umbrella apps.

Made it possible to build assets for multiple phoenix apps inside an umbrella.
Removed some phoenix and dirs auto detection.
Made the compile script more explicit but easier to customize.
Removed support for older phoenix versions.
Implemented caching per umbrella app.

@andrejj
Copy link
Author

andrejj commented Apr 16, 2021

I opened this PR by mistake. It's WIP on our end to support building assets for an umbrella app with more than one phoenix app.
Fell free to close or let me know if you'd be interested in using some of the approaches here.

Gist - compile script that builds two apps:

# app_root/compile

# Build first phoenix app
phoenix_dir=$build_dir/apps/first_app_web
assets_dir=$build_dir/assets
info "Phoenix dir ${phoenix_dir}"

cd $assets_dir
install_and_cache_node_modules
npm run deploy
remove_assets_node_modules

cd $phoenix_dir
mix "phx.digest"
mix "phx.digest.clean"

# Build second phoenix app
phoenix_dir=$build_dir/apps/second_app_web
assets_dir=$build_dir/assets
info "Phoenix dir ${phoenix_dir}"

cd $assets_dir
install_and_cache_node_modules
npm run deploy
remove_assets_node_modules

cd $phoenix_dir
mix "phx.digest"
mix "phx.digest.clean"

@peaceful-james
Copy link

@jesseshieh Would this work with Gigalixir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants