2020-08-10 15:45:26 +00:00
|
|
|
VER_FONTAWESOME=5.14.0
|
2018-05-05 16:09:37 +00:00
|
|
|
|
|
|
|
|
2021-09-08 15:43:24 +00:00
|
|
|
default: generate download_libs
|
2018-05-05 16:09:37 +00:00
|
|
|
|
2021-09-08 15:43:24 +00:00
|
|
|
generate:
|
2021-09-26 12:49:18 +00:00
|
|
|
docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:14-alpine \
|
|
|
|
sh -exc "apk add make && make -C src -f ../Makefile generate-inner && chown -R $(shell id -u) frontend src/node_modules"
|
2021-09-26 22:52:44 +00:00
|
|
|
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:14-alpine \
|
|
|
|
sh -exc "apk add make && make generate-apidocs && chown -R $(shell id -u) frontend"
|
|
|
|
|
|
|
|
generate-apidocs:
|
|
|
|
npx redoc-cli bundle docs/openapi.yaml --disableGoogleFont true -o frontend/api.html
|
2021-09-26 12:49:18 +00:00
|
|
|
|
|
|
|
generate-inner:
|
|
|
|
npx npm@lts ci
|
|
|
|
npx npm@lts run build
|
2017-08-03 16:33:56 +00:00
|
|
|
|
2021-09-26 22:52:44 +00:00
|
|
|
publish: download_libs generate-apidocs
|
2021-09-26 12:49:18 +00:00
|
|
|
$(MAKE) -C src -f ../Makefile generate-inner
|
2017-08-03 16:33:56 +00:00
|
|
|
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
|
|
|
bash golang.sh
|
2018-05-05 16:09:37 +00:00
|
|
|
|
|
|
|
# -- Download / refresh external libraries --
|
|
|
|
|
|
|
|
clean_libs:
|
2021-09-08 15:43:24 +00:00
|
|
|
rm -rf \
|
|
|
|
frontend/css \
|
|
|
|
frontend/js \
|
|
|
|
frontend/openssl \
|
|
|
|
frontend/webfonts
|
|
|
|
|
|
|
|
download_libs: clean_libs
|
|
|
|
download_libs: fontawesome
|
2018-05-05 16:09:37 +00:00
|
|
|
|
|
|
|
fontawesome:
|
|
|
|
curl -sSfL https://github.com/FortAwesome/Font-Awesome/archive/$(VER_FONTAWESOME).tar.gz | \
|
2019-05-10 14:19:38 +00:00
|
|
|
tar -vC frontend -xz --strip-components=1 --wildcards --exclude='*/js-packages' '*/css' '*/webfonts'
|