Skip to content

Commit

Permalink
Move sources to frontend folder (#701)
Browse files Browse the repository at this point in the history
* move sources to frontend folder
* use npm for angular-spectrum-colorpicker
* remove convert_config_v1v2.py
* remove unused 404.html and .htaccess
  • Loading branch information
KraPete authored Feb 20, 2025
1 parent f782d9c commit ae3896c
Show file tree
Hide file tree
Showing 647 changed files with 87 additions and 985 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

73 changes: 9 additions & 64 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,73 +1,18 @@
.PHONY: all test build clean install uninstall configs
.PHONY: all test clean install uninstall frontend

PATH := /usr/local/bin:$(PATH)

all: build
all: frontend

clean:
npm run clean
$(MAKE) -C frontend clean

test:
# FIXME: this replaces git:// with https:// somewhere in node modules
# which fixes build after Github banned unauthenticated access
# (https://github.blog/2021-09-01-improving-git-protocol-security-github/)
git config url."https://".insteadOf git://
git submodule foreach --recursive git config url."https://".insteadOf git://

npm install
git submodule init
git submodule update
npm run test

build:
# FIXME: this replaces git:// with https:// somewhere in node modules
# which fixes build after Github banned unauthenticated access
# (https://github.blog/2021-09-01-improving-git-protocol-security-github/)
git config url."https://".insteadOf git://
git submodule foreach --recursive git config url."https://".insteadOf git://

npm install
git submodule init
git submodule update
npm run build

configs:
mkdir -p dist/configs
cp -a configs/config.*.json dist/configs
for wb in wb6 wb7 wb74 wb8 wb85; do \
minify configs/$$wb.svg > dist/configs/$$wb.svg; \
j2 configs/config.$$wb.json.jinja > dist/configs/config.$$wb.json; \
done

install: configs
install -d -m 0777 $(DESTDIR)/var/www/css
install -d -m 0777 $(DESTDIR)/var/www/images
install -d -m 0777 $(DESTDIR)/var/www/uploads
install -d -m 0777 $(DESTDIR)/var/www/scripts/i18n

cp -a dist/css/*.css $(DESTDIR)/var/www/css
cp -a dist/images/* $(DESTDIR)/var/www/images
cp -a -R dist/scripts/i18n/* $(DESTDIR)/var/www/scripts/i18n
cp -a dist/favicon.ico $(DESTDIR)/var/www/favicon.ico
cp -a dist/*.js $(DESTDIR)/var/www/
cp -a dist/*.svg $(DESTDIR)/var/www/
cp -a dist/*.png $(DESTDIR)/var/www/
cp -a dist/*.ttf $(DESTDIR)/var/www/
cp -a dist/*.woff $(DESTDIR)/var/www/
cp -a dist/*.woff2 $(DESTDIR)/var/www/ || :
$(MAKE) -C frontend test

install -m 0644 dist/404.html $(DESTDIR)/var/www/
install -m 0644 dist/robots.txt $(DESTDIR)/var/www/
install -m 0644 dist/index.html $(DESTDIR)/var/www/
frontend:
$(MAKE) -C frontend

install -Dm0644 dist/configs/*.json -t $(DESTDIR)/usr/share/wb-mqtt-homeui
install -Dm0755 convert_config_v1v2.py $(DESTDIR)/usr/lib/wb-mqtt-homeui/convert_config_v1v2
install -Dm0644 webui.schema.json -t $(DESTDIR)/usr/share/wb-mqtt-confed/schemas
install -Dm0644 wb-configs.rules $(DESTDIR)/etc/wb-configs.d/20wb-mqtt-homeui
install:
$(MAKE) -C frontend install

uninstall:
rm -fR $(DESTDIR)/var/www/*
rm -f $(DESTDIR)/etc/wb-webui.conf
rm -fR $(DESTDIR)/var/www/uploads/
rm -fR $(DESTDIR)/usr/share/wb-mqtt-confed
rm -fR $(DESTDIR)/usr/share/wb-mqtt-homeui
$(MAKE) -C frontend uninstall
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@ Wiren Board web interface.
## MQTT naming conventions

See into [conventions](https://github.com/wirenboard/conventions/blob/main/README.md) to understand how to organize devices and controls (what write to /meta/type for example).

## Build & development

Run `npm run build` for building and `npm start` for preview.

## Default SVG-Dashboards

In default svg-dashboards, the text is converted to curves. If you need to add something - add new text and select the Ubuntu font.
1 change: 0 additions & 1 deletion app/.buildignore

This file was deleted.

Loading

0 comments on commit ae3896c

Please sign in to comment.