Skip to content

Commit d680b7e

Browse files
committed
require node 14+.
let's use node from docker. using dotenv for secrets. routing now uses mapbox routing api. using fetch for fetching.
1 parent 16a92f1 commit d680b7e

File tree

14 files changed

+493
-1730
lines changed

14 files changed

+493
-1730
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/build/
22
/node_modules/
3+
/node/
4+
.env

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222

2323
## first time setup
2424

25+
* you need to set environment variable `CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN`
26+
* `echo "CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN=$CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN" >.env`
2527
* `./update.sh`
26-
* `npm install`
28+
* `docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm install`
2729
* `./build.sh`
2830

2931
## non server-side layers

build-production.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
set -e #exit on failure
44

55
#first time: npm install
6-
npm run build-production
6+
docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm run build-production
77

build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
set -e #exit on failure
44

5-
rm -rf dist/assets
6-
75
#first time: npm install
8-
npm run build
6+
docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm run build
97

buttons.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"class": "layer",
2323
"name": "sat",
2424
"type": "raster",
25-
"source": {"type": "raster", "tiles": ["https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiY3ljbGVtYXB1cyIsImEiOiJjanNhbHRlaGMwMGp2NDNqeG80Mzk2cmExIn0.0OBPtvf3KANeaA6QOCk1yw"]},
25+
"source": {"type": "raster", "tiles": ["https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/{z}/{x}/{y}?access_token={CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN}"]},
2626
"beforeId": "satellite-anchor"
2727
},
2828
{ "id": "weather", "class": "directory", "source": [

dist/cyclemaps.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>cyclemaps</title>
7-
<link rel="stylesheet" type="text/css" href="dist/assets/cyclemaps-A78e9tiA.css" />
7+
<link rel="stylesheet" type="text/css" href="dist/cyclemaps.css" />
88
<script type="module" src="dist/cyclemaps.js"></script>
99

1010
<link rel="icon" href="sprite/bikeicon.png">

0 commit comments

Comments
 (0)