X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/6e68f11776a8f6f5a62b989f13ebf7438ef32476..2a34127a122a0d415a1cabb8de8e80a91b3dc017:/CONTRIBUTE.md?ds=sidebyside diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index e8c56e3..7224832 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -4,14 +4,15 @@ ## Background +Uses [Svelte](https://svelte.dev/) framework, +[Leaflet](https://leafletjs.com/) for map interaction, +[Bootstrap](https://getbootstrap.com/) for layout styling. + The user interface used to be included in the geocoder. Thus the -first version avoid being a redesign and still uses some of the +first version avoided being a redesign and still uses some of the same configuration values. Version 2 was a full refactor using Svelte. Version 3 added theme and easier configuration. -Uses [svelte](https://svelte.dev/) framework, -[leaflet](https://leafletjs.com/) for map interaction, -[bootstrap](https://getbootstrap.com/) for layout styling. ## Building the frontend @@ -27,27 +28,47 @@ Uses [svelte](https://svelte.dev/) framework, ``` yarn dev ``` - which will start a webserver on port 9880 and auto-reloads - whenever you edit files. + which will start a webserver on port 9080 and auto-reloads + whenever you edit files. Configuration in `rollup.config.js`. ## Testing -* Run syntax linter +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.json`) + + ``` + yarn test + API_ON_SAME_PORT=1 yarn test + ``` + + 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 ``` + ## Prepare a release 1. Update version number in `package.json` file 2. Update `CHANGES.md` file -3. Run `yarn build` to make sure the `dist/build/` files don't contain lifereload.js - -4. Commit your changes: `git add... `, `git commit ...`, `git push ...` etc +3. Commit your changes: `git add ... `, `git commit ...`, `git push ...` etc -5. Tag release: `git tag THE_VERSION_NUMBER`, `git push --tags` +4. Tag release: `git tag THE_VERSION_NUMBER`, `git push --tags` -6. Upload release \ No newline at end of file +5. 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.