rely on gpx postinstall script to build the library

This commit is contained in:
vcoppe
2024-09-24 13:45:30 +02:00
parent 9a2541b6f3
commit 4c56468970
4 changed files with 11 additions and 20 deletions

View File

@@ -18,12 +18,6 @@ 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,17 +29,9 @@ 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 these two parts.
You will need [Node.js](https://nodejs.org/) to build and run the website.
### Building the `gpx` library
```bash
cd gpx
npm install
npm run build
```
### Running the website
### Running the website in development mode
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 run build"
"postinstall": "npm install && npm run build"
}
}

View File

@@ -73,6 +73,7 @@
},
"../gpx": {
"version": "1.0.0",
"hasInstallScript": true,
"dependencies": {
"fast-xml-parser": "^4.4.0",
"immer": "^10.1.1",
@@ -2163,14 +2164,18 @@
}
},
"node_modules/@sveltejs/enhanced-img": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@sveltejs/enhanced-img/-/enhanced-img-0.3.0.tgz",
"integrity": "sha512-o8FdEUyJR/+LjUUl4sgB9QeM9rSGpOzTO6/CH0AmO/FgwWkcJdj/MwVNtr2F/AtaPgNfzvRpnExjklmuuDOtPA==",
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@sveltejs/enhanced-img/-/enhanced-img-0.3.8.tgz",
"integrity": "sha512-n66u46ZeqHltiTm0BEjWptYmCrCY0EltEEvakmC7d5o5ZejDbOvOWm914mebbRKaP2Bezv65TNCod/wqvw/0KA==",
"dev": true,
"dependencies": {
"magic-string": "^0.30.5",
"svelte-parse-markup": "^0.1.2",
"vite-imagetools": "^7.0.1"
},
"peerDependencies": {
"svelte": "^4.0.0 || ^5.0.0-next.0",
"vite": ">= 5.0.0"
}
},
"node_modules/@sveltejs/kit": {