summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-05-23 23:39:01 +0200
committerxengineering <me@xengineering.eu>2026-05-23 23:42:27 +0200
commit0c2903126aa2df80d1ea40295df6365ea37b7651 (patch)
tree90839c7c3ed91cc486f2d82657f84e66d3a6fdc4
parenta72c0c275a962153a40bc805e5ce3ac7a273f55c (diff)
downloadfinserv-0c2903126aa2df80d1ea40295df6365ea37b7651.tar
finserv-0c2903126aa2df80d1ea40295df6365ea37b7651.tar.zst
finserv-0c2903126aa2df80d1ea40295df6365ea37b7651.zip
frontend: Add Meson build system
This is a first step towards using Meson for the whole repository. Having one central build system allows many things like ensuring that the frontend page is build before embedding it into the Go executable or like transpiling TypeScript to JavaScript before building the frontend page.
-rw-r--r--frontend/layouts/meson.build6
-rw-r--r--frontend/meson.build25
-rw-r--r--meson.build6
3 files changed, 37 insertions, 0 deletions
diff --git a/frontend/layouts/meson.build b/frontend/layouts/meson.build
new file mode 100644
index 0000000..3057a77
--- /dev/null
+++ b/frontend/layouts/meson.build
@@ -0,0 +1,6 @@
+foreach hugo_source : [
+ 'baseof.html',
+ 'home.html',
+]
+ hugo_source_targets += fs.copyfile(hugo_source)
+endforeach
diff --git a/frontend/meson.build b/frontend/meson.build
new file mode 100644
index 0000000..e387145
--- /dev/null
+++ b/frontend/meson.build
@@ -0,0 +1,25 @@
+fs = import('fs')
+
+hugo = find_program('hugo', required : true)
+
+hugo_source_targets = []
+
+foreach hugo_source : [
+ 'hugo.toml',
+]
+ hugo_source_targets += fs.copyfile(hugo_source)
+endforeach
+
+subdir('layouts')
+
+custom_target(
+ output : 'public',
+ command : [
+ hugo,
+ 'build',
+ '--source', meson.current_build_dir(),
+ '--destination', meson.current_build_dir() / 'public',
+ ],
+ depends : hugo_source_targets,
+ build_by_default : true,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..451844c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,6 @@
+project(
+ 'finserv',
+ version : files('VERSION.txt'),
+)
+
+subdir('frontend')