]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - CONTRIBUTE.md
Add build output into dist/ for immediate use
[nominatim-ui.git] / CONTRIBUTE.md
index 7ef727d4c31156f26520a1ef0cbe6224682c81b5..bef0e99d3a1815614b563171ff67475edbfec263 100644 (file)
@@ -28,7 +28,7 @@ Svelte. Version 3 added theme and easier configuration.
    ```
    yarn dev
    ```
-   which will start a webserver on port 9880 and auto-reloads
+   which will start a webserver on port 9080 and auto-reloads
    whenever you edit files. Configuration in `rollup.config.js`.
 
 ## Testing
@@ -36,13 +36,24 @@ Svelte. Version 3 added theme and easier configuration.
 The `test/` setup uses [Mocha](https://mochajs.org/) to run tests. Tests use [Puppeteer](https://pptr.dev/) to control a Google Chrome headless browser and evaluate with [Assert](https://nodejs.org/api/assert.html).
 
 
-* Run integration test suite (configuration in `.mocharc.js`)
+* Run integration test suite (configuration in `.mocharc.json`)
 
    ```
    yarn test
+   API_ON_SAME_PORT=1 yarn test
    ```
 
-* Run syntax linter (configuration in `.eslint.js`)
+   Setting API_ON_SAME_PORT simulates having both the API and UI on the same server
+   port. That's a rare setup but something https://nominatim.openstreetmap.org/ does
+   so worth testing.
+
+   To run a single test file only
+
+   ```
+   yarn run rollup -c && yarn run mocha test/details.js
+   ```
+
+* Run syntax linter (configuration in `.eslint.json`)
 
    ```
    yarn lint
@@ -51,13 +62,15 @@ The `test/` setup uses [Mocha](https://mochajs.org/) to run tests. Tests use [Pu
 
 ## Prepare a release
 
-1. Update version number in `package.json` file
+1. Create build (dist/bundle/ files): `yarn build`
+
+2. Update version number in `package.json` file
 
-2. Update `CHANGES.md` file
+3. Update `CHANGES.md` file
 
-3. Commit your changes: `git add... `, `git commit ...`, `git push ...` etc
+4. Commit your changes: `git add ... `, `git commit ...`, `git push ...` etc
 
-4. Tag release: `git tag THE_VERSION_NUMBER`, `git push --tags`
+5. Tag release: `git tag THE_VERSION_NUMBER`, `git push --tags`
 
-5. Create release on https://github.com/osm-search/nominatim-ui/releases
+6. Create release on https://github.com/osm-search/nominatim-ui/releases
    This (a triggered Github Action) will run `yarn build` and add the `dist/build/bundle.*` files.