diff --git a/.gitignore b/.gitignore index 6627466..d23a26d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ .parcel-cache/ ec*.exe - -# public (build) -public/content/ -public/index.* -public/manifest.webmanifest -public/*.png +public/ diff --git a/.prettierignore b/.prettierignore index 0642887..a3b56d0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,4 @@ -public/index.* +public/ app/assets/css/bootstrap* app/assets/js/bootstrap* package.json diff --git a/clean_public.sh b/clean_public.sh index 1e357f7..8ab7bad 100755 --- a/clean_public.sh +++ b/clean_public.sh @@ -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!" diff --git a/package.json b/package.json index b442481..a5efc54 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/public/pages/404.html b/pages/404.html similarity index 100% rename from public/pages/404.html rename to pages/404.html diff --git a/public/pages/about.html b/pages/about.html similarity index 100% rename from public/pages/about.html rename to pages/about.html diff --git a/public/pages/games.html b/pages/games.html similarity index 100% rename from public/pages/games.html rename to pages/games.html diff --git a/public/pages/home.html b/pages/home.html similarity index 100% rename from public/pages/home.html rename to pages/home.html diff --git a/public/js/lastfm-nowplay.js b/pages/js/lastfm-nowplay.js similarity index 100% rename from public/js/lastfm-nowplay.js rename to pages/js/lastfm-nowplay.js diff --git a/public/js/rev2.js b/pages/js/rev2.js similarity index 78% rename from public/js/rev2.js rename to pages/js/rev2.js index 5c90553..2cf986d 100644 --- a/public/js/rev2.js +++ b/pages/js/rev2.js @@ -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); } diff --git a/public/pages/personal.html b/pages/personal.html similarity index 100% rename from public/pages/personal.html rename to pages/personal.html diff --git a/public/pages/rer2.html b/pages/rer2.html similarity index 95% rename from public/pages/rer2.html rename to pages/rer2.html index 70db8f8..5aa4b2f 100644 --- a/public/pages/rer2.html +++ b/pages/rer2.html @@ -17,7 +17,7 @@

Изображение: @@ -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( diff --git a/public/pages/trash.html b/pages/trash.html similarity index 100% rename from public/pages/trash.html rename to pages/trash.html