Răsfoiți Sursa

feature: HTML/JS/CSS minifiction and cache busting

jamesread 2 ani în urmă
părinte
comite
086d8fd21c

+ 1 - 1
.github/workflows/build-snapshot.yml

@@ -25,7 +25,7 @@ jobs:
         uses: actions/setup-node@v3
         with:
           cache: 'npm'
-          cache-dependency-path: webui/package-lock.json
+          cache-dependency-path: webui.dev/package-lock.json
 
       - name: Setup Go
         uses: actions/setup-go@v5

+ 1 - 1
.github/workflows/build-tag.yml

@@ -26,7 +26,7 @@ jobs:
         uses: actions/setup-node@v3
         with:
           cache: 'npm'
-          cache-dependency-path: webui/package-lock.json
+          cache-dependency-path: webui.dev/package-lock.json
 
       - name: Setup Go
         uses: actions/setup-go@v5

+ 1 - 1
.github/workflows/codeql-analysis.yml

@@ -17,7 +17,7 @@ on:
     paths:
       - 'cmd/**'
       - 'internal/**'
-      - 'webui/**'
+      - 'webui.dev/**'
       - 'integration-tests/**'
       - 'OliveTin.proto'
     branches: [main]

+ 1 - 1
.github/workflows/codestyle.yml

@@ -6,7 +6,7 @@ on:
     paths:
       - 'cmd/**'
       - 'internal/**'
-      - 'webui/**'
+      - 'webui.dev/**'
       - 'integration-tests/**'
       - 'OliveTin.proto'
 

+ 3 - 1
.gitignore

@@ -1,4 +1,3 @@
-webui/node_modules
 **/*.swp
 **/*.swo
 gen/
@@ -10,3 +9,6 @@ releases/
 dist/
 installation-id.txt
 tmp/
+webui/
+webui.dev/node_modules
+webui.dev/.parcel-cache

+ 1 - 1
.goreleaser.yml

@@ -2,7 +2,7 @@ project_name: OliveTin
 before:
   hooks:
     - go mod download
-    - rm -rf webui/node_modules
+    - make webui-dist
 builds:
   - env:
       - CGO_ENABLED=0

+ 7 - 3
Makefile

@@ -63,9 +63,13 @@ devrun: compile
 devcontainer: compile podman-image podman-container
 
 webui-codestyle:
-	cd webui && npm install
-	cd webui && ./node_modules/.bin/eslint main.js js/*
-	cd webui && ./node_modules/.bin/stylelint style.css
+	cd webui.dev && npm install
+	cd webui.dev && ./node_modules/.bin/eslint main.js js/*
+	cd webui.dev && ./node_modules/.bin/stylelint style.css
+
+webui-dist:
+	cd webui.dev && npm install
+	cd webui.dev && parcel build --dist-dir ../webui/
 
 clean:
 	rm -rf dist OliveTin OliveTin.armhf OliveTin.exe reports gen

+ 0 - 0
webui/.eslintrc.json → webui.dev/.eslintrc.json


+ 0 - 0
webui/.stylelintrc.json → webui.dev/.stylelintrc.json


+ 0 - 0
webui/OliveTinLogo-120px.png → webui.dev/OliveTinLogo-120px.png


+ 0 - 0
webui/OliveTinLogo-180px.png → webui.dev/OliveTinLogo-180px.png


+ 0 - 0
webui/OliveTinLogo-57px.png → webui.dev/OliveTinLogo-57px.png


+ 0 - 0
webui/OliveTinLogo.png → webui.dev/OliveTinLogo.png


+ 0 - 0
webui/OliveTinLogo.svg → webui.dev/OliveTinLogo.svg


+ 0 - 0
webui/index.html → webui.dev/index.html


+ 0 - 0
webui/js/ActionButton.js → webui.dev/js/ActionButton.js


+ 0 - 0
webui/js/ArgumentForm.js → webui.dev/js/ArgumentForm.js


+ 0 - 0
webui/js/ExecutionButton.js → webui.dev/js/ExecutionButton.js


+ 0 - 0
webui/js/ExecutionDialog.js → webui.dev/js/ExecutionDialog.js


+ 0 - 0
webui/js/ExecutionFeedbackButton.js → webui.dev/js/ExecutionFeedbackButton.js


+ 0 - 0
webui/js/marshaller.js → webui.dev/js/marshaller.js


+ 0 - 0
webui/js/websocket.js → webui.dev/js/websocket.js


+ 0 - 0
webui/main.js → webui.dev/main.js


Fișier diff suprimat deoarece este prea mare
+ 1963 - 1347
webui.dev/package-lock.json


+ 2 - 1
webui/package.json → webui.dev/package.json

@@ -3,13 +3,14 @@
   "version": "1.0.0",
   "description": "The WebUI for OliveTin",
   "repository": "http://github.com/OliveTin/OliveTin",
-  "main": "main.js",
+  "source": "index.html",
   "devDependencies": {
     "eslint": "^7.25.0",
     "eslint-config-standard": "^16.0.2",
     "eslint-plugin-import": "^2.22.1",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^4.3.1",
+    "parcel": "^2.11.0",
     "stylelint": "^15.6.0",
     "stylelint-config-standard": "^33.0.0"
   },

+ 0 - 0
webui/style.css → webui.dev/style.css


+ 0 - 0
webui/themes/waffles/theme.css → webui.dev/themes/waffles/theme.css


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff