feature: HTML/JS/CSS minifiction and cache busting
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ on:
|
|||
paths:
|
||||
- 'cmd/**'
|
||||
- 'internal/**'
|
||||
- 'webui/**'
|
||||
- 'webui.dev/**'
|
||||
- 'integration-tests/**'
|
||||
- 'OliveTin.proto'
|
||||
branches: [main]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ on:
|
|||
paths:
|
||||
- 'cmd/**'
|
||||
- 'internal/**'
|
||||
- 'webui/**'
|
||||
- 'webui.dev/**'
|
||||
- 'integration-tests/**'
|
||||
- 'OliveTin.proto'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
10
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
|
||||
|
|
|
|||
|
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",
|
||||
"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"
|
||||
},
|
||||