diff --git a/.gitignore b/.gitignore index 48409d40..08f685b5 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,13 @@ yarn-error.log* coverage *~ +*.swp bots # madge graph of dependencies generated by `npm run circular:graph` deps.png + +# build directories +cockpit/public/vendor* +cockpit/public/src_* +cockpit/public/main* diff --git a/Makefile b/Makefile index 34bba831..2e02ea55 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ FISTBOOT_SERVICE := $(shell base64 -w0 < aux/custom-first-boot.service) +INSTALL_DIR := ~/.local/share/cockpit/image-builder-frontend help: @cat Makefiles @@ -14,3 +15,19 @@ install: start: prep npm start +cockpit/all: devel-uninstall devel-install build + +devel-install: + mkdir -p ~/.local/share/cockpit + ln -s $(shell pwd)/cockpit/public $(INSTALL_DIR) + +build: + npm run build:cockpit + +devel-uninstall: + rm -rf $(INSTALL_DIR) + rm cockpit/public/*.css + rm cockpit/public/*.js + +.PHONY: cockpit/all devel-install build devel-uninstall + diff --git a/package.json b/package.json index 5b158b5d..ed9b76df 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "test:watch": "TZ=UTC vitest", "test:coverage": "TZ=UTC vitest run --coverage", "build": "fec build", + "build:cockpit": "webpack --config cockpit/webpack.config.ts", "api": "npm-run-all api:pull api:generate", "api:generate": "bash api/codegen.sh", "api:pull": "bash api/pull.sh",