build pages

This commit is contained in:
Alexander Popov 2023-08-06 01:36:52 +03:00
parent 397090f177
commit d74420608f
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
13 changed files with 13 additions and 12 deletions

7
.gitignore vendored
View File

@ -1,8 +1,3 @@
.parcel-cache/
ec*.exe
# public (build)
public/content/
public/index.*
public/manifest.webmanifest
public/*.png
public/

View File

@ -1,4 +1,4 @@
public/index.*
public/
app/assets/css/bootstrap*
app/assets/js/bootstrap*
package.json

View File

@ -1,6 +1,7 @@
#!/bin/sh
files=(
"pages/"
"manifest.webmanifest"
"index.html"
"*.css*"
@ -11,7 +12,7 @@ echo -n "Remove all build files in 'public'... "
for file in "${files[@]}"
do
rm ./public/$file &> /dev/null
rm -rf ./public/$file &> /dev/null
done
echo "Complete!"

View File

@ -6,7 +6,9 @@
"scripts": {
"serve": "npx parcel serve --dist-dir public app/index.html",
"serve-https": "npx parcel serve --https --dist-dir public app/index.html",
"build": "npm run clean; npx parcel build --dist-dir public app/index.html --no-optimize; npm run git-hash",
"build": "npm run clean; npm run build-pages; npm run build-app; npm run git-hash",
"build-app": "npx parcel build --no-cache --no-optimize --no-scope-hoist --no-content-hash --dist-dir public app/index.html",
"build-pages": "npx parcel build --no-cache --no-optimize --no-scope-hoist --no-content-hash --dist-dir public/pages pages/*.html",
"prettier": "npx prettier --write .",
"git-hash": "./update_commit.sh",
"clean": "./clean_public.sh",

View File

@ -1,3 +1,4 @@
export function update_rev2(data) {
let time_remaining = document.getElementById('rev2_time_remaining')
let time_remaining = document.getElementById('rev2_time_remaining');
console.log(data);
}

View File

@ -17,7 +17,7 @@
<div class="d-none">
<img
class="img-fluid shadow rounded m-3"
src="/content/images/2023/resident_evil_revelations_2_wallpaper_by_brendabirkin.jpg"
src="//content/images/2023/resident_evil_revelations_2_wallpaper_by_brendabirkin.jpg"
/>
<p class="text-center text-muted">
Изображение:
@ -132,7 +132,9 @@
function autorun() {
if (true) {
get_from_api((data) => {update_rev2(data);}, 'rev2_monsters')
get_from_api((data) => {
update_rev2(data);
}, 'rev2_monsters');
setInterval(autorun, 120_000); // 2 minutes
} else {
console.log(