From 37053702f2c2b7091efb6b220e18946e7de24ed8 Mon Sep 17 00:00:00 2001
From: David Trattnig <david@subsquare.at>
Date: Tue, 6 Sep 2022 11:14:07 +0200
Subject: [PATCH] chore(make): add `dist` and `clean` targets

---
 .gitignore |  1 +
 Makefile   | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/.gitignore b/.gitignore
index 1565ee3..5a8ece8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 /node_modules/
 /public/build/
+/dist
 
 .DS_Store
 sync.sh
diff --git a/Makefile b/Makefile
index b7a311f..4bd47c8 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,9 @@ help::
 	@echo "    init.dev        - init development environment"
 	@echo "    lint            - verify code style"
 	@echo "    spell           - check spelling of text"
+	@echo "    clean           - clean artifacts"
 	@echo "    build           - build a production bundle"
+	@echo "    dist            - create a dist package"
 	@echo "    run             - start app in development mode"
 	@echo "    start           - start app with sirv server (public)"
 	$(call docker_help)
@@ -39,9 +41,24 @@ lint::
 spell::
 	npm run spell
 
+clean::
+	rm -rf dist
+	mkdir -p dist/assets
+
 build::
 	npm run build
 
+dist::clean
+dist::build
+dist::
+	cp public/service-worker.js dist
+	cp public/manifest.json dist
+	cp public/build/smui-dark.css dist
+	cp public/build/smui.css dist
+	cp public/build/aura-player-bundle.* dist
+	cp public/assets/*.svg dist/assets
+	rm dist/assets/aura_fav.svg
+
 run::
 	npm run dev
 
-- 
GitLab