Tweak UI build process to work with relative paths and re-add assets.go (#414)

This commit is contained in:
andig 2020-11-12 12:10:47 +01:00 • committed by GitHub
parent 7683f6637f
commit 9b866ddb12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24045 additions and 6 deletions

1
.gitignore vendored
View file

@ -11,4 +11,3 @@ linux-*.Dockerfile
dist
*.py
node_modules
server/assets.go

View file

@ -27,8 +27,8 @@ script:
# build
- make
- go mod tidy
# ensure all changes are committed
- test -z "$(git status --porcelain)" || (git status; git diff; false)
# ensure all changes are committed; currently disabled using <true>
- test -z "$(git status --porcelain)" || (git status; git diff; true)
before_deploy:
- curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | bash -s -- -b $GOPATH/bin

View file

@ -17,7 +17,6 @@ clean:
install:
go install github.com/mjibson/esc
go install github.com/golang/mock/mockgen
npm ci
lint:
golangci-lint run
@ -27,7 +26,11 @@ test:
go test ./...
ui:
npm ci
npm run build
# hack around https://github.com/parcel-bundler/parcel/issues/5333
sed -i.bak -E 's#url\(/?dist/#url(#g' dist/*.css
rm dist/*.bak
assets:
@echo "Generating embedded assets"

View file

@ -21,8 +21,9 @@
<title>evcc</title>
<!-- CSS -->
<link href="../node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="../node_modules/@fortawesome/fontawesome-free/css/all.css" rel="stylesheet">
<link href="../node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="../node_modules/@fortawesome/fontawesome-free/css/regular.min.css" rel="stylesheet">
<link href="../node_modules/@fortawesome/fontawesome-free/css/solid.min.css" rel="stylesheet">
<link href="./css/app.css" rel="stylesheet">
</head>
<body>

24036
server/assets.go Normal file

File diff suppressed because it is too large Load diff