Skip to content

Commit f3be16a

Browse files
WIP
1 parent 15295ef commit f3be16a

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

build.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@
721721
</exec>
722722
</target>
723723

724-
<target name="environment-change" depends="production-protection" description="Change application environment and install composer dev-dependencies when development environment is selected.">
724+
<target name="environment-change" depends="production-protection" description="Change application environment and install Composer and NPM dependencies for the selected environment.">
725725
<if>
726726
<not><isset property="change.environment"/></not>
727727
<then>
@@ -752,11 +752,12 @@
752752
</exec>
753753
</else>
754754
</if>
755+
<phingcall target="npm-install-dependencies"/>
755756
<phingcall target="clean-cache"/>
756757
<phingcall target="maintenance-off"/>
757758
</target>
758759

759-
<target name="environment-change-prod" description="Change application environment to production and install production composer dependencies.">
760+
<target name="environment-change-prod" description="Change application environment to production and install production dependencies.">
760761
<property name="change.environment" value="prod"/>
761762
<phingcall target="environment-change"/>
762763
</target>
@@ -901,6 +902,7 @@
901902
<exec executable="/bin/sh" logoutput="true" passthru="true" checkreturn="true">
902903
<arg value="${path.framework}/scripts/npm-install-with-retry.sh"/>
903904
<arg value="${path.npm.executable}"/>
905+
<arg value="${path.root}"/>
904906
</exec>
905907
</target>
906908

@@ -1058,9 +1060,9 @@
10581060
</if>
10591061
</target>
10601062

1061-
<target name="standards" depends="phplint,ecs,markdown-check,annotations-check,phpstan,twig-lint,yaml-standards,js-standards-check" description="Checks coding standards."/>
1063+
<target name="standards" depends="phplint,ecs,markdown-check,annotations-check,phpstan,twig-lint,yaml-standards,js-standards-check,stylelint" description="Checks coding standards."/>
10621064

1063-
<target name="standards-diff" depends="phplint-diff,ecs-diff,markdown-check,annotations-check,phpstan,twig-lint-diff,yaml-standards,js-standards-check" description="Checks coding standards in changed files."/>
1065+
<target name="standards-diff" depends="phplint-diff,ecs-diff,markdown-check,annotations-check,phpstan,twig-lint-diff,yaml-standards,js-standards-check,stylelint" description="Checks coding standards in changed files."/>
10641066

10651067
<target name="standards-fix" depends="ecs-fix,markdown-fix,annotations-fix,yaml-standards-fix,js-standards-fix,ux-icons-lock" description="Automatically fixes *some* coding standards violations in all files. Always run 'standards' to be sure there are no further violations."/>
10661068

scripts/npm-install-with-retry.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33
set -e
44

55
npm_executable="${1:-npm}"
6+
application_root="${2:-.}"
67
max_attempts=5
78

9+
install_dependencies() {
10+
if [ -f "$application_root/DEVELOPMENT" ] || [ -f "$application_root/TEST" ] || [ -f "$application_root/ACCEPTANCE" ]; then
11+
"$npm_executable" install --install-links
12+
else
13+
"$npm_executable" install --omit=dev
14+
fi
15+
}
16+
817
for attempt in 1 2 3 4 5; do
9-
if "$npm_executable" install; then
18+
if install_dependencies; then
1019
exit 0
1120
fi
1221

0 commit comments

Comments
 (0)