1
Fork 0

Configure static assets

This commit is contained in:
viktorstrate 2021-02-25 13:37:45 +01:00
parent 58bc7b8d5f
commit bceaf48469
No known key found for this signature in database
GPG Key ID: 3F855605109C1E8A
6 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
const fs = require('fs')
const fs = require('fs-extra')
const esbuild = require('esbuild')
const bs = require('browser-sync').create()
const historyApiFallback = require('connect-history-api-fallback')
@ -38,6 +38,9 @@ fs.rmdirSync('dist/', {
})
fs.mkdirSync('dist/')
fs.copyFileSync('src/index.html', 'dist/index.html')
fs.copyFileSync('src/manifest.webmanifest', 'dist/manifest.json')
fs.copyFileSync('src/favicon.ico', 'dist/favicon.ico')
fs.copySync('src/assets/', 'dist/assets/')
if (watchMode) {
let builderPromise = esbuild.build(esbuildOptions)

1
ui/package-lock.json generated
View File

@ -47,6 +47,7 @@
"eslint-plugin-jest-dom": "^3.6.3",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"fs-extra": "^4.0.3",
"husky": "^4.3.5",
"jest": "^26.6.3",
"lint-staged": "^10.5.3",

View File

@ -49,6 +49,7 @@
"eslint-plugin-jest-dom": "^3.6.3",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"fs-extra": "^4.0.3",
"husky": "^4.3.5",
"jest": "^26.6.3",
"lint-staged": "^10.5.3",

BIN
ui/src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -3,12 +3,12 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="./manifest.webmanifest" />
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="/src/index.css" />
<!-- Apple touch devices -->
<link rel="apple-touch-icon" href="./assets/apple-touch-icon.png" />
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Photoview" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />

View File

@ -8,15 +8,15 @@
"background_color": "white",
"icons": [
{
"src": "./assets/logo192.png",
"src": "/assets/logo192.png",
"sizes": "192x192"
},
{
"src": "./assets/logo512.png",
"src": "/assets/logo512.png",
"sizes": "512x512"
},
{
"src": "./assets/photoview-logo.svg",
"src": "/assets/photoview-logo.svg",
"sizes": "150x150"
}
]