Integrate landingpage build process with cmake

This commit is contained in:
pathmapper 2021-12-27 15:40:18 +01:00
parent 8b1d08d711
commit 00f727bd1c
8 changed files with 23 additions and 7 deletions

3
.gitignore vendored
View File

@ -56,6 +56,9 @@ qgis.kdev4
qgis.supp
qgis-test.ctest
qtcreator-build/
resources/server/api/ogc/static/landingpage
resources/server/src/landingpage/landingpage.stamp
resources/server/src/landingpage/node_modules
resources/themes/*/style.qss.auto
scripts/astyle.exe
scripts/Debug

View File

@ -32,6 +32,24 @@ endif()
if (WITH_SERVER)
file(GLOB_RECURSE SERVER_RESOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/*)
set(RESOURCES_FILES ${RESOURCES_FILES} ${SERVER_RESOURCE_FILES})
# Landingpage
file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
list(REMOVE_ITEM $(LANDINGPAGE_SOURCE_FILES) "*landingpage.stamp")
add_custom_target (yarn-target ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp)
add_custom_command(
POST_BUILD
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
DEPENDS ${LANDINGPAGE_SOURCE_FILES}
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage && yarn install --frozen-lockfile && yarn build
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/server/api/ogc/static/landingpage/
${CMAKE_CURRENT_BINARY_DIR}/../output/data/resources/server/api/ogc/static/landingpage/
)
endif()
# Apple specific handling

View File

@ -1 +0,0 @@
.v-app-bar.v-app-bar--fixed,.v-footer{z-index:10000!important}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -17,7 +17,7 @@ yarn serve
yarn build
```
Built files needs to be moved from `dist` to `resources/server/api/ogc/static/landingpage`.
Built files location: `resources/server/api/ogc/static/landingpage`
### Lints and fixes files
```

View File

@ -1,5 +1,6 @@
module.exports = {
publicPath: './',
outputDir: '../../api/ogc/static/landingpage/',
assetsDir: './',
configureWebpack: {
devtool: "source-map",