From 294ff5bedfd3d21ceafe51486175b09be4138e47 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Tue, 24 Sep 2024 14:50:44 +0200 Subject: [PATCH] revert to 2 step build --- .github/workflows/deploy.yml | 6 ++++++ README.md | 12 ++++++++++-- gpx/package.json | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f15883f3..f05cc40d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/README.md b/README.md index 7f05e339..b6a51cf8 100644 --- a/README.md +++ b/README.md @@ -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 Mapbox access token and store it in a `.env` file in the `website` directory. diff --git a/gpx/package.json b/gpx/package.json index 3d35f22b..809e2536 100644 --- a/gpx/package.json +++ b/gpx/package.json @@ -22,6 +22,6 @@ }, "scripts": { "build": "tsc", - "postinstall": "npm install && npm run build" + "postinstall": "npm run build" } } \ No newline at end of file