-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move sources to frontend folder (#701)
* 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
Showing
647 changed files
with
87 additions
and
985 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.