Skip to content

Commit

Permalink
EZP-30412: Composer is always using dev for generating encore assets …
Browse files Browse the repository at this point in the history
…(#383)
  • Loading branch information
webhdx authored and Łukasz Serwatka committed Apr 4, 2019
1 parent 2c1e657 commit 07b2f7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bin/compile_assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Script to generate assets using `yarn encore`.
# It checks SYMFONY_ENV to ensure assets are generated for correct production/development environment.

if [ "${SYMFONY_ENV}" == "dev" ] ; then
yarn encore dev
else
yarn encore prod
fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@php bin/console bazinga:js-translation:dump web/assets --merge-domains",
"@php bin/console assetic:dump",
"yarn install",
"yarn encore dev",
"bin/compile_assets.sh",
"@php bin/security-checker security:check"
],
"post-install-cmd": [
Expand Down

0 comments on commit 07b2f7c

Please sign in to comment.