Skip to content

Commit

Permalink
add npm run deploy-vsp, deploy-asim, deploy-staging commands*
Browse files Browse the repository at this point in the history
You still need to edit vite.config.js before you run these commands.
  • Loading branch information
billyc committed Dec 3, 2021
1 parent e403280 commit 0dc3cd2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simwrapper",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"license": "GPL-3.0-or-later",
"author": "Billy Charlton <charlton@tu-berlin.de>",
Expand All @@ -9,13 +9,15 @@
"Janek Laudan <laudan@vsp.tu-berlin.de>"
],
"scripts": {
"deploy-vsp": "cp -f public/404.simwrapper.html public/404.html && bash scripts/deploy-ghpages.sh matsim-vsp/simwrapper",
"deploy-staging": "cp -f public/404.staging.html public/404.html && bash scripts/deploy-ghpages.sh simwrapper/staging",
"deploy-asim": "cp -f public/404.dashboard.html public/404.html && bash scripts/deploy-ghpages.sh activitysim/dashboard",
"serve": "vite",
"build": "vite build",
"release": "standard-version",
"test:unit": "broken//vue-cli-service test:unit",
"lint": "broken//vue-cli-service lint",
"bumpversion": "standard-version",
"deploy": "bash scripts/deploy-ghpages.sh matsim-vsp/simwrapper"
"bumpversion": "standard-version"
},
"dependencies": {
"@aftersim/pako": "^1.0.11-3",
Expand Down
9 changes: 9 additions & 0 deletions public/404.dashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
sessionStorage.redirect = location.href
</script>
<meta http-equiv="refresh" content="0;URL='/dashboard/'" />
</head>
</html>
9 changes: 9 additions & 0 deletions public/404.simwrapper.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
sessionStorage.redirect = location.href
</script>
<meta http-equiv="refresh" content="0;URL='/simwrapper/'" />
</head>
</html>
9 changes: 9 additions & 0 deletions public/404.staging.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
sessionStorage.redirect = location.href
</script>
<meta http-equiv="refresh" content="0;URL='/staging/'" />
</head>
</html>
3 changes: 3 additions & 0 deletions scripts/deploy-ghpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# DEPLOY: Build site into /dist folder and PUSH to gh-pages branch ON GITHUB
set -euo pipefail

echo --- CLEARING ---
rm -rf dist

echo --- BUILDING ---
npm run build

Expand Down

0 comments on commit 0dc3cd2

Please sign in to comment.