summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-06-14 19:27:42 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-06-14 20:50:35 +0200
commit813e5971c52df6961fe28569597144332e12984b (patch)
tree38fa09b4253a2160ffa4e812199f84f34424ccde /build.xml
parent96ed854c16164c6e3fc269923f0e5dc9ae9287c9 (diff)
Add Parcel bundler to build process.
Change-Id: Iade8364efa0d2ce9443b67e20bf09ea93a3d7bcd
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml25
1 files changed, 24 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index bf22e83..04cdeb8 100644
--- a/build.xml
+++ b/build.xml
@@ -34,6 +34,28 @@
</condition>
</target>
+ <target name="parcel" depends="parcel.check,yarn" if="parcel.run">
+ <exec executable="yarn" dir="${web-dir}">
+ <arg value="parcel"/>
+ <arg value="build"/>
+ <arg value="lib.css"/>
+ <arg value="lib.js"/>
+ <arg value="lazychat/newLazychatMessage.js"/>
+ <arg value="bookmarks/newBookmark.js"/>
+ <arg value="posts/postList.js"/>
+ <arg value="web_modules/ContentTools.js"/>
+ <arg value="web_modules/ContentTools/build/content-tools.min.css"/>
+ </exec>
+ </target>
+
+ <target name="parcel.check">
+ <condition property="parcel.run">
+ <not>
+ <available file="${web-dir}/dist"/>
+ </not>
+ </condition>
+ </target>
+
<target name="flow" depends="snowpack">
<exec executable="yarn" dir="${web-dir}">
<arg value="run"/>
@@ -56,7 +78,8 @@
<target name="web.resources" depends="snowpack" unless="skip-web"/>
<target name="web.check" unless="skip-web" depends="web.resources,flow,eslint"/>
- <target name="web" unless="skip-web" depends="web.resources,web.check" description="Generate web resources"/>
+ <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"/>
<target name="package" description="Create executable JAR">
<exec executable="./mvnw">