Configure static assets
This commit is contained in:
parent
58bc7b8d5f
commit
bceaf48469
|
@ -1,4 +1,4 @@
|
||||||
const fs = require('fs')
|
const fs = require('fs-extra')
|
||||||
const esbuild = require('esbuild')
|
const esbuild = require('esbuild')
|
||||||
const bs = require('browser-sync').create()
|
const bs = require('browser-sync').create()
|
||||||
const historyApiFallback = require('connect-history-api-fallback')
|
const historyApiFallback = require('connect-history-api-fallback')
|
||||||
|
@ -38,6 +38,9 @@ fs.rmdirSync('dist/', {
|
||||||
})
|
})
|
||||||
fs.mkdirSync('dist/')
|
fs.mkdirSync('dist/')
|
||||||
fs.copyFileSync('src/index.html', 'dist/index.html')
|
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) {
|
if (watchMode) {
|
||||||
let builderPromise = esbuild.build(esbuildOptions)
|
let builderPromise = esbuild.build(esbuildOptions)
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
"eslint-plugin-jest-dom": "^3.6.3",
|
"eslint-plugin-jest-dom": "^3.6.3",
|
||||||
"eslint-plugin-react": "^7.21.5",
|
"eslint-plugin-react": "^7.21.5",
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
|
"fs-extra": "^4.0.3",
|
||||||
"husky": "^4.3.5",
|
"husky": "^4.3.5",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"lint-staged": "^10.5.3",
|
"lint-staged": "^10.5.3",
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
"eslint-plugin-jest-dom": "^3.6.3",
|
"eslint-plugin-jest-dom": "^3.6.3",
|
||||||
"eslint-plugin-react": "^7.21.5",
|
"eslint-plugin-react": "^7.21.5",
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
|
"fs-extra": "^4.0.3",
|
||||||
"husky": "^4.3.5",
|
"husky": "^4.3.5",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"lint-staged": "^10.5.3",
|
"lint-staged": "^10.5.3",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -3,12 +3,12 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<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" />
|
<link rel="stylesheet" href="/src/index.css" />
|
||||||
|
|
||||||
<!-- Apple touch devices -->
|
<!-- 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-title" content="Photoview" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
"background_color": "white",
|
"background_color": "white",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "./assets/logo192.png",
|
"src": "/assets/logo192.png",
|
||||||
"sizes": "192x192"
|
"sizes": "192x192"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "./assets/logo512.png",
|
"src": "/assets/logo512.png",
|
||||||
"sizes": "512x512"
|
"sizes": "512x512"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "./assets/photoview-logo.svg",
|
"src": "/assets/photoview-logo.svg",
|
||||||
"sizes": "150x150"
|
"sizes": "150x150"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue