revert to 2 step build

This commit is contained in:
vcoppe
2024-09-24 14:50:44 +02:00
parent 58415af7da
commit 294ff5bedf
3 changed files with 17 additions and 3 deletions

View File

@@ -18,6 +18,12 @@ jobs:
cache-dependency-path: |
gpx/package-lock.json
website/package-lock.json
- name: Install dependencies for gpx
run: npm install --prefix gpx
- name: Build gpx
run: npm run build --prefix gpx
- name: Install dependencies for website
run: npm install --prefix website

View File

@@ -29,9 +29,17 @@ The code is split into two parts:
- `gpx`: a Typescript library for parsing and manipulating GPX files,
- `website`: the website itself, which is a [SvelteKit](https://kit.svelte.dev/) application.
You will need [Node.js](https://nodejs.org/) to build and run the website.
You will need [Node.js](https://nodejs.org/) to build and run these two parts.
### Running the website in development mode
### Building the `gpx` library
```bash
cd gpx
npm install
npm run build
```
### Running the website
To be able to load the map, you will need to create your own <a href="https://account.mapbox.com/auth/signup" target="_blank">Mapbox access token</a> and store it in a `.env` file in the `website` directory.

View File

@@ -22,6 +22,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "npm install && npm run build"
"postinstall": "npm run build"
}
}