feature: HTML/JS/CSS minifiction and cache busting
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: webui/package-lock.json
|
cache-dependency-path: webui.dev/package-lock.json
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: webui/package-lock.json
|
cache-dependency-path: webui.dev/package-lock.json
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'cmd/**'
|
- 'cmd/**'
|
||||||
- 'internal/**'
|
- 'internal/**'
|
||||||
- 'webui/**'
|
- 'webui.dev/**'
|
||||||
- 'integration-tests/**'
|
- 'integration-tests/**'
|
||||||
- 'OliveTin.proto'
|
- 'OliveTin.proto'
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'cmd/**'
|
- 'cmd/**'
|
||||||
- 'internal/**'
|
- 'internal/**'
|
||||||
- 'webui/**'
|
- 'webui.dev/**'
|
||||||
- 'integration-tests/**'
|
- 'integration-tests/**'
|
||||||
- 'OliveTin.proto'
|
- 'OliveTin.proto'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
webui/node_modules
|
|
||||||
**/*.swp
|
**/*.swp
|
||||||
**/*.swo
|
**/*.swo
|
||||||
gen/
|
gen/
|
||||||
|
|
@ -10,3 +9,6 @@ releases/
|
||||||
dist/
|
dist/
|
||||||
installation-id.txt
|
installation-id.txt
|
||||||
tmp/
|
tmp/
|
||||||
|
webui/
|
||||||
|
webui.dev/node_modules
|
||||||
|
webui.dev/.parcel-cache
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ project_name: OliveTin
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod download
|
||||||
- rm -rf webui/node_modules
|
- make webui-dist
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
|
|
||||||
10
Makefile
|
|
@ -63,9 +63,13 @@ devrun: compile
|
||||||
devcontainer: compile podman-image podman-container
|
devcontainer: compile podman-image podman-container
|
||||||
|
|
||||||
webui-codestyle:
|
webui-codestyle:
|
||||||
cd webui && npm install
|
cd webui.dev && npm install
|
||||||
cd webui && ./node_modules/.bin/eslint main.js js/*
|
cd webui.dev && ./node_modules/.bin/eslint main.js js/*
|
||||||
cd webui && ./node_modules/.bin/stylelint style.css
|
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:
|
clean:
|
||||||
rm -rf dist OliveTin OliveTin.armhf OliveTin.exe reports gen
|
rm -rf dist OliveTin OliveTin.armhf OliveTin.exe reports gen
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
|
@ -3,13 +3,14 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "The WebUI for OliveTin",
|
"description": "The WebUI for OliveTin",
|
||||||
"repository": "http://github.com/OliveTin/OliveTin",
|
"repository": "http://github.com/OliveTin/OliveTin",
|
||||||
"main": "main.js",
|
"source": "index.html",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.25.0",
|
"eslint": "^7.25.0",
|
||||||
"eslint-config-standard": "^16.0.2",
|
"eslint-config-standard": "^16.0.2",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^4.3.1",
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
|
"parcel": "^2.11.0",
|
||||||
"stylelint": "^15.6.0",
|
"stylelint": "^15.6.0",
|
||||||
"stylelint-config-standard": "^33.0.0"
|
"stylelint-config-standard": "^33.0.0"
|
||||||
},
|
},
|
||||||