diff --git a/README.md b/README.md new file mode 100644 index 0000000..4022709 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# realtime-oslo +Small app to see real-time locations of Ruter buses / trams using data from public APIs provided by Entur. + +See in action: https://roligheten.github.io/realtime-oslo/ diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..6b7656c --- /dev/null +++ b/deploy.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +npm run build + +# navigate into the build output directory +cd dist + +# if you are deploying to a custom domain +# echo 'www.example.com' > CNAME + +git init +git checkout -b master +git add -A +git commit -m 'deploy' + +git push -f git@github.com:roligheten/realtime-oslo.git master:gh-pages + +cd - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3e75d24..5198c5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,9 @@ "@preact/preset-vite": "^2.1.5", "@types/leaflet": "^1.7.9", "@types/leaflet.locatecontrol": "^0.74.0", + "@types/node": "^17.0.23", "@types/styled-components": "^5.1.24", + "@types/ws": "^8.5.3", "typescript": "^4.5.4", "vite": "^2.9.0" } @@ -585,6 +587,12 @@ "@types/leaflet": "*" } }, + "node_modules/@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", + "dev": true + }, "node_modules/@types/prop-types": { "version": "15.7.4", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", @@ -619,6 +627,15 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/ws": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", + "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@wry/context": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.6.1.tgz", @@ -2301,6 +2318,12 @@ "@types/leaflet": "*" } }, + "@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", + "dev": true + }, "@types/prop-types": { "version": "15.7.4", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", @@ -2335,6 +2358,15 @@ "csstype": "^3.0.2" } }, + "@types/ws": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", + "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@wry/context": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.6.1.tgz", diff --git a/package.json b/package.json index c1d8b7d..a558e7c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,9 @@ "@preact/preset-vite": "^2.1.5", "@types/leaflet": "^1.7.9", "@types/leaflet.locatecontrol": "^0.74.0", + "@types/node": "^17.0.23", "@types/styled-components": "^5.1.24", + "@types/ws": "^8.5.3", "typescript": "^4.5.4", "vite": "^2.9.0" } diff --git a/tsconfig.json b/tsconfig.json index ed41ce1..dc714c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "useDefineForClassFields": true, "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, - "skipLibCheck": false, + "skipLibCheck": true, "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, @@ -16,7 +16,8 @@ "noEmit": true, "jsx": "preserve", "jsxFactory": "h", - "jsxFragmentFactory": "Fragment", + "jsxFragmentFactory": "Fragment" }, + "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] -} +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 41a23ba..a5ac098 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,4 +3,5 @@ import preact from "@preact/preset-vite"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [preact()], + base: "/realtime-oslo/", });