From dd50b1d9eaf713159fe7eea82051a9dec61b418f Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 28 Mar 2019 16:53:05 +0100 Subject: [PATCH] Add bundling script. --- scripts/create-bundle.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/create-bundle.sh diff --git a/scripts/create-bundle.sh b/scripts/create-bundle.sh new file mode 100755 index 0000000..81df50d --- /dev/null +++ b/scripts/create-bundle.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [[ ! -d .git ]]; then + echo 'Not in the root, bailing!' >&2 + exit 1 +fi + +# Refresh all dependencies +yarn +composer install --no-dev + +# Build the JS files +yarn run webpack --mode production + +# Create the archive +tar -czf isdefoobaropen.nl.tar.gz \ + --transform 's/^/isdefoobaropen.nl\//' \ + src \ + vendor \ + public \ + templates \ + config