|
1 | 1 | <project name="frontend" default="frontend:install">
|
2 | 2 |
|
3 |
| - <target name="frontend:build" depends="frontend:install" description="Uses gulp to build front end dependencies for all themes."> |
4 |
| - <if> |
5 |
| - <isset property="project.themes"/> |
6 |
| - <then> |
7 |
| - <foreach list="${project.themes}" param="frontend.theme" target="frontend:build:run"/> |
8 |
| - </then> |
9 |
| - </if> |
| 3 | + <target name="frontend:build" description="Uses gulp to build front end dependencies for all themes."> |
| 4 | + <phingcall target="task:execute"> |
| 5 | + <property name="task-name" value="frontend"/> |
| 6 | + </phingcall> |
10 | 7 | </target>
|
11 | 8 |
|
12 |
| - <target name="frontend:build:run" depends="frontend:install" description="Uses gulp to build front end dependencies for a theme."> |
13 |
| - <if> |
14 |
| - <!-- We assume that if the theme name is not thunder, then a subtheme of thunder is being used. --> |
15 |
| - <not><equals arg1="${frontend.theme}" arg2="thunder" /></not> |
16 |
| - <then> |
17 |
| - <exec dir="${docroot}/themes/custom/${frontend.theme}" command="npm run build" logoutput="true" checkreturn="true" /> |
18 |
| - </then> |
19 |
| - </if> |
20 |
| - |
21 |
| - <property name="project.frontend.nvmrc.file" value="${docroot}/themes/custom/${frontend.theme}/.nvmrc" /> |
22 |
| - <if> |
23 |
| - <available file="${project.frontend.nvmrc.file}" /> |
24 |
| - <then> |
25 |
| - <copy file="${project.frontend.nvmrc.file}" todir="${repo.root}" /> |
26 |
| - </then> |
27 |
| - </if> |
28 |
| - </target> |
29 |
| - |
30 |
| - <target name="frontend:install" description="Installs front end dependencies for themes."> |
31 |
| - <!-- Enable support for multiple themes (Base + Subtheme or multisite deployments) --> |
32 |
| - <if> |
33 |
| - <isset property="project.themes" /> |
34 |
| - <then> |
35 |
| - <foreach list="${project.themes}" param="frontend.theme" target="frontend:install:run"/> |
36 |
| - </then> |
37 |
| - <else> |
38 |
| - <!-- Skip and tell user no themes were found --> |
39 |
| - <echo message="No Themes were found, skipping frontend:install."/> |
40 |
| - </else> |
41 |
| - </if> |
42 |
| - </target> |
43 |
| - |
44 |
| - <target name="frontend:install:run" description="Installs front end dependencies for a theme."> |
45 |
| - <if> |
46 |
| - <!-- We assume that if the theme name is not thunder, then a subtheme of thunder is being used. --> |
47 |
| - <not><equals arg1="${frontend.theme}" arg2="thunder" /></not> |
48 |
| - <then> |
49 |
| - <exec dir="${docroot}/themes/custom/${frontend.theme}" command="npm run install-tools" logoutput="true" checkreturn="true" /> |
50 |
| - </then> |
51 |
| - </if> |
52 |
| - </target> |
53 | 9 | </project>
|
0 commit comments