diff options
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"/> |