updated manifest and added jenkinsfile
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
Vendored
+48
@@ -0,0 +1,48 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'node&&windows'
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage ('Initialize') {
|
||||||
|
steps {
|
||||||
|
echo 'Initializing..'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
echo 'Building..'
|
||||||
|
bat 'npm install'
|
||||||
|
bat 'npm run build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
echo 'Testing..'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Archive') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
expression {
|
||||||
|
currentBuild.result == null || currentBuild.result == 'SUCCESS'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
echo 'Deploying....'
|
||||||
|
dir("dist") {
|
||||||
|
bat 'git init'
|
||||||
|
bat 'git add .'
|
||||||
|
bat 'git config --global user.email "jenkins@bosym.de"'
|
||||||
|
bat 'git config --global user.name "Jenkins"'
|
||||||
|
bat 'git commit -m "Deploy by Jenkins"'
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'e3d97a6f-476f-489f-a207-4766a1c420cf', usernameVariable: 'username', passwordVariable: 'password')])
|
||||||
|
{
|
||||||
|
bat "git push --force --quiet \"https://$username:$password@git.bosym.de/Pascal/realtime-oepnv-tracker.git\" master:gh-pages"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
-2
@@ -10,7 +10,6 @@ Number.prototype.mod = function (n) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
import * as L from 'leaflet';
|
import * as L from 'leaflet';
|
||||||
import mapSrc from "../map.png";
|
|
||||||
import Bus from "./Bus";
|
import Bus from "./Bus";
|
||||||
import Line from "./Line";
|
import Line from "./Line";
|
||||||
import stops201 from './lines/201.csv';
|
import stops201 from './lines/201.csv';
|
||||||
@@ -151,5 +150,12 @@ btnShowStops.addEventListener('click', () => {
|
|||||||
btnShowStops.innerText = showStops ? 'Hide Stops' : 'Show Stops'
|
btnShowStops.innerText = showStops ? 'Hide Stops' : 'Show Stops'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
navigator.serviceWorker.register('./service-worker.js').catch(() => {
|
||||||
|
}).then();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -42,10 +42,10 @@ module.exports = merge(base, {
|
|||||||
favicons: {
|
favicons: {
|
||||||
manifestRelativePaths: true,
|
manifestRelativePaths: true,
|
||||||
start_url: "../",
|
start_url: "../",
|
||||||
appName: 'RT Delbus',
|
appName: 'RealTime Delbus',
|
||||||
appDescription: 'Real-Time Delbus',
|
appDescription: 'Real-Time Delbus Map',
|
||||||
appShortName: "rt-delbus",
|
appShortName: "RealTime Delbus",
|
||||||
developerName: 'Syma.Dev',
|
developerName: 'syma.dev',
|
||||||
developerURL: "https://syma.dev",
|
developerURL: "https://syma.dev",
|
||||||
background: '#000',
|
background: '#000',
|
||||||
theme_color: '#333',
|
theme_color: '#333',
|
||||||
|
|||||||
Reference in New Issue
Block a user