From 0c2903126aa2df80d1ea40295df6365ea37b7651 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 23 May 2026 23:39:01 +0200 Subject: 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. --- frontend/layouts/meson.build | 6 ++++++ frontend/meson.build | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 frontend/layouts/meson.build create mode 100644 frontend/meson.build (limited to 'frontend') 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, +) -- cgit v1.3