X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/6beafb16431a1cf87ad160ab50b07db31971d873..334237778713f039f8d079251578b4c8f9b20645:/CONTRIBUTE.md?ds=inline diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index de818e8..7ef727d 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -1,17 +1,18 @@ # Developing Nominatim-UI +[![Continuous Integration](https://github.com/osm-search/nominatim-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/osm-search/nominatim-ui/actions/workflows/ci.yml) + ## 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 -same configuration values. For simplicity it's not a single -page application (SPA) written in a framework though it could -be in the future if complexity grows. +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 [jQuery](https://jquery.com/) for browser DOM interaction, -[handlebar](http://handlebarsjs.com/) templates to build pages, -[leaflet](https://leafletjs.com/) for map interaction, -[bootstrap](https://getbootstrap.com/) for layout styling. ## Building the frontend @@ -25,21 +26,29 @@ Uses [jQuery](https://jquery.com/) for browser DOM interaction, * After you change files in `src` directory run ``` - yarn build + yarn dev ``` + which will start a webserver on port 9880 and auto-reloads + whenever you edit files. Configuration in `rollup.config.js`. + +## Testing -* Start a webserver on port 8000 to preview changes +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`) ``` - yarn start + yarn test ``` -* Run code style check +* Run syntax linter (configuration in `.eslint.js`) ``` yarn lint ``` + ## Prepare a release 1. Update version number in `package.json` file @@ -50,4 +59,5 @@ Uses [jQuery](https://jquery.com/) for browser DOM interaction, 4. Tag release: `git tag THE_VERSION_NUMBER`, `git push --tags` -5. 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.