-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Adding support for custom commands in frontend and setup targ…
…ets." (#194)
- Loading branch information
Showing
5 changed files
with
79 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,53 @@ | ||
<project name="frontend" default="frontend:install"> | ||
|
||
<target name="frontend:build" description="Uses gulp to build front end dependencies for all themes."> | ||
<phingcall target="task:execute"> | ||
<property name="task-name" value="frontend"/> | ||
</phingcall> | ||
<target name="frontend:build" depends="frontend:install" description="Uses gulp to build front end dependencies for all themes."> | ||
<if> | ||
<isset property="project.themes"/> | ||
<then> | ||
<foreach list="${project.themes}" param="frontend.theme" target="frontend:build:run"/> | ||
</then> | ||
</if> | ||
</target> | ||
|
||
<target name="frontend:build:run" depends="frontend:install" description="Uses gulp to build front end dependencies for a theme."> | ||
<if> | ||
<!-- We assume that if the theme name is not thunder, then a subtheme of thunder is being used. --> | ||
<not><equals arg1="${frontend.theme}" arg2="thunder" /></not> | ||
<then> | ||
<exec dir="${docroot}/themes/custom/${frontend.theme}" command="npm run build" logoutput="true" checkreturn="true" /> | ||
</then> | ||
</if> | ||
|
||
<property name="project.frontend.nvmrc.file" value="${docroot}/themes/custom/${frontend.theme}/.nvmrc" /> | ||
<if> | ||
<available file="${project.frontend.nvmrc.file}" /> | ||
<then> | ||
<copy file="${project.frontend.nvmrc.file}" todir="${repo.root}" /> | ||
</then> | ||
</if> | ||
</target> | ||
|
||
<target name="frontend:install" description="Installs front end dependencies for themes."> | ||
<!-- Enable support for multiple themes (Base + Subtheme or multisite deployments) --> | ||
<if> | ||
<isset property="project.themes" /> | ||
<then> | ||
<foreach list="${project.themes}" param="frontend.theme" target="frontend:install:run"/> | ||
</then> | ||
<else> | ||
<!-- Skip and tell user no themes were found --> | ||
<echo message="No Themes were found, skipping frontend:install."/> | ||
</else> | ||
</if> | ||
</target> | ||
|
||
<target name="frontend:install:run" description="Installs front end dependencies for a theme."> | ||
<if> | ||
<!-- We assume that if the theme name is not thunder, then a subtheme of thunder is being used. --> | ||
<not><equals arg1="${frontend.theme}" arg2="thunder" /></not> | ||
<then> | ||
<exec dir="${docroot}/themes/custom/${frontend.theme}" command="npm run install-tools" logoutput="true" checkreturn="true" /> | ||
</then> | ||
</if> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters