OSMCha is composed by a group of softwares that together has the aim to make it easier to monitor and validate the changes in OpenStreetMap. Learn more …
This repository contains the frontend code. Other repositories are:
This repository uses prettier to keep the code consistent and formatted. You can config your favourite editor by the following links
asdf install
to install the required tools from .tool-versionsyarn install
(brew install yarn
if required).yarn start
To also edit the part of the UI that is provided by the OSM Changeset Viewer
Checkout https://github.com/osmlab/changeset-map in a sibling folder.
In ./changeset-map
:
yarn link
yarn build --watch
In ./osmcha-frontend
yarn link "changeset-map"
yarn start
Edits in both projects will result in a rebuild and reload the browser.
When finished, reset "osmcha-frontend" back to the npm version of "changeset-map" with yarn add changeset-map@latest
Test the application before commiting any changes. If you encounter any error make sure you have watchman
installed. Installation Guide.
yarn test
yarn deploy:dev
deploys it to mapbox.github.io
yarn deploy:staging
deploys it to staging.osmcha.org
yarn deploy:prod
deploys it to osmcha.org
Run the tests with yarn test
(optional) before deploy, you might want to increment the version number of application.
minor
for all non-drastic changes.patch
is reserved for minor changes.npm version minor
Then build the app with the following command.
yarn build:<stack>
dev
, staging
, prod
. Refer to package.json for more info.The next step involves deploying the build
folder to github. If you get an error like this error: failed to push some refs to 'git'
while doing the deploy step. Run rm -rf node_modules/gh-pages/.cache/
.
yarn deploy:<stack>
dev
, staging
, prod
. Refer to package.json for more info.oh-pages
branch handles the build for staging
, prod
stacks.gh-pages
branch handles the build for dev
stack.(optional) If you want to see the new changes on a staging
or prod
stack. You will need to draft a new github release. The convention is to append -staging
or -production
or just -server
to the current version tag for the server to consume the build and separate concerns.
v0.16.3
.v0.16.3-staging
. (Note the name spacing)If you have any error reports of want to request new features, please read our contribution guide to file an issue.