Skip to content

Commit 785d595

Browse files
juliusvjan--f
authored andcommitted
ui build: create requires web/ui/static dir ad hoc
Signed-off-by: Jan Fajerski <[email protected]>
1 parent dadad9b commit 785d595

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ benchmark.txt
2222
/documentation/examples/remote_storage/example_write_adapter/example_write_adapter
2323

2424
npm_licenses.tar.bz2
25-
/web/ui/static/react-app
26-
/web/ui/static/mantine-ui
25+
/web/ui/static
2726

2827
/vendor
2928
/.build

web/ui/build_ui.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ then
2121
fi
2222

2323
buildOrder=(lezer-promql codemirror-promql)
24+
assetsDir="./static"
2425

2526
function buildModule() {
2627
for module in "${buildOrder[@]}"; do
@@ -32,15 +33,17 @@ function buildModule() {
3233
function buildReactApp() {
3334
echo "build react-app"
3435
(cd react-app && npm run build)
35-
rm -rf ./static/react-app
36-
mv ./react-app/build ./static/react-app
36+
mkdir -p ${assetsDir}
37+
rm -rf ${assetsDir}/react-app
38+
mv ./react-app/build ${assetsDir}/react-app
3739
}
3840

3941
function buildMantineUI() {
4042
echo "build mantine-ui"
4143
npm run build -w @prometheus-io/mantine-ui
42-
rm -rf ./static/mantine-ui
43-
mv ./mantine-ui/dist ./static/mantine-ui
44+
mkdir -p ${assetsDir}
45+
rm -rf ${assetsDir}/mantine-ui
46+
mv ./mantine-ui/dist ${assetsDir}/mantine-ui
4447
}
4548

4649
for i in "$@"; do

0 commit comments

Comments
 (0)