diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-15 17:39:35 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-15 17:39:35 +0100 |
commit | 93a19fbfbce5b44ec1c8d7250d89951777b36fdd (patch) | |
tree | f0f84ec74dff21d33a87820660ad86935262b623 /build.xml | |
parent | 77d0f7b66f7838a845e34aa7bb00108dfe052928 (diff) |
build.xml: Update for latest Snowpack changes.
Change-Id: I97b5482c020b454a2fa1e4244e43100f3f7ddbd7
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -24,10 +24,10 @@ </target> <target name="snowpack" depends="snowpack.check,yarn" if="snowpack.run"> + <!-- Build for development --> <exec executable="yarn" dir="${web-dir}"> <arg value="run"/> <arg value="snowpack"/> - <arg value="--optimize"/> </exec> </target> @@ -39,6 +39,23 @@ </condition> </target> + <target name="snowpack-build" depends="snowpack-build.check,yarn" if="snowpack-build.run"> + <!-- Build for distribution --> + <exec executable="yarn" dir="${web-dir}"> + <arg value="run"/> + <arg value="snowpack"/> + <arg value="build"/> + </exec> + </target> + + <target name="snowpack-build.check"> + <condition property="snowpack-build.run"> + <not> + <available file="${web-dir}/build/web_modules"/> + </not> + </condition> + </target> + <target name="parcel" depends="parcel.check,yarn" if="parcel.run"> <exec executable="yarn" dir="${web-dir}"> <arg value="parcel"/> @@ -78,7 +95,7 @@ </exec> </target> - <target name="web.resources" depends="snowpack" unless="skip-web"/> + <target name="web.resources" depends="snowpack,snowpack-build" unless="skip-web"/> <target name="web.check" unless="skip-web" depends="web.resources,flow,eslint"/> <target name="web.bundle" unless="skip-web" depends="web.resources,parcel"/> <target name="web" unless="skip-web" depends="web.resources,web.check,web.bundle" description="Generate web resources"/> |