Skip to content

Commit 71167ea

Browse files
authored
Merge pull request #358 from tordans/install-instructions
Update installation instructions
2 parents f476a82 + cc860c1 commit 71167ea

File tree

2 files changed

+37
-33
lines changed

2 files changed

+37
-33
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ JavaScript error message.
3131

3232
When in doubt, be over-descriptive of the bug and how you discovered it.
3333

34-
## How to login when running locally in development mode
34+
---
3535

36-
* Start the development server with `yarn start`;
37-
* After loading the page in your browser, inspect the request made to `social-auth/` and copy the `oauth_token`;
38-
* In other browser tab, access `https://www.openstreetmap.org/oauth/authorize?oauth_token=<oauth_token>` and give authorization in the OpenStreetMap page that will load;
39-
* You will be redirected to a blank page that has a `oauth_verifier` in the url. Copy the `oauth_verifier`;
40-
* Click on the `Sign in` button on your local OSMCha instance, paste the `oauth_verifier` and you will be logged in.
41-
42-
43-
-- This doc was inspired from [iD](https://github.com/openstreetmap/iD/blob/master/CONTRIBUTING.md)
36+
This doc was inspired from [iD](https://github.com/openstreetmap/iD/blob/master/CONTRIBUTING.md)

README.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,58 @@ This repository uses [prettier](https://github.com/prettier/prettier) to keep th
2020
- Atom users can simply install the [prettier-atom](https://atom.io/packages/prettier-atom) package and use Ctrl+Alt+F to format a file (or format on save if enabled).
2121
- Visual Studio Code users can Search for Prettier - JavaScript formatter.
2222

23-
## Workflow
23+
### Prerequisite
24+
- Make sure your node version is *9.1*.
25+
- Install `yarn` globally using `brew install yarn`.
26+
- Install `watchman` globally with `brew install watchman`.
2427

25-
`yarn start`
28+
### Local development
29+
1. `yarn start`
30+
1. Open [https://localhost:3000/?filters={%22date__gte%22%3A[{%22label%22%3A%222017-05-01%22%2C%22value%22%3A%222017-05-01%22}]}](https://localhost:3000/?filters={%22date__gte%22%3A[{%22label%22%3A%222017-05-01%22%2C%22value%22%3A%222017-05-01%22}]})
31+
- The app runs with https; Firefox is recommended since it allows self signed certificates.
32+
- The staging database only has changesets until mid 2017; without the filter you will not see any changesets.
2633

27-
Runs the app in the development mode.
28-
Open http://localhost:3000 to view it in the browser.
34+
*To sign in:*
2935

36+
1. After loading the page in your browser, inspect the request made to `social-auth/` and copy the `oauth_token`;
37+
1. In other browser tab, access `https://www.openstreetmap.org/oauth/authorize?oauth_token=<oauth_token>` and give authorization in the OpenStreetMap page that will load;
38+
1. You will be redirected to a blank page that has a `oauth_verifier` in the url. Copy the `oauth_verifier`;
39+
1. Click on the `Sign in` button on your local OSMCha instance, paste the `oauth_verifier` and you will be logged in.
3040

31-
### Prerequisite
32-
- Make sure your node version is 7.
33-
- Install `yarn` globally using `brew install yarn`.
34-
- Install `watchman` globally with `brew install watchman`.
41+
### Local testing
42+
Test the application before commiting any changes. If you encounter any error make sure you have `watchman` installed. [Installation Guide](https://facebook.github.io/watchman/docs/install.html).
3543

36-
### Deploy/Release
44+
```bash
45+
yarn test
46+
```
47+
48+
## Deploy/Release
3749
- There are three stacks to deploy to
3850
- `yarn deploy:dev` deploys it to `mapbox.github.io`
3951
- `yarn deploy:staging` deploys it to `osmcha-django-staging.tilestream.net`
4052
- `yarn deploy:prod` deploys it to `osmcha.mapbox.com`
4153

42-
1. Test the application before commiting any changes. If you encounter any error make sure you have `watchman` installed. [Installation Guide](https://facebook.github.io/watchman/docs/install.html).
43-
44-
```bash
45-
yarn test
46-
```
54+
1. Run the tests with `yarn test`
4755

4856
2. (optional) before deploy, you might want to increment the version number of application.
4957
* We use `minor` for all non-drastic changes.
5058
* The `patch` is reserved for minor changes.
5159
* We try to stick to sem-ver.
52-
```bash
53-
npm version minor
54-
```
60+
```bash
61+
npm version minor
62+
```
5563

5664

5765
3. Then build the app with the following command.
58-
```bash
59-
yarn build:<stack>
60-
```
66+
```bash
67+
yarn build:<stack>
68+
```
6169
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
6270

6371
4. 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/`.
64-
```
65-
yarn deploy:<stack>
66-
```
72+
```
73+
yarn deploy:<stack>
74+
```
6775
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
6876
* `oh-pages` branch handles the build for `staging`, `prod` stacks.
6977
* `gh-pages` branch handles the build for `dev` stack.
@@ -82,5 +90,8 @@ yarn deploy:<stack>
8290
* [OSMCha python library](https://github.com/willemarcel/osmcha) _(used to analyse the OSM changesets)_
8391
* [osm-compare](https://github.com/mapbox/osm-compare) _(used to analyse the OSM features)_
8492

93+
94+
## Issues and feature requests
95+
8596
If you have any error reports of want to request new features, please
86-
[report here](https://github.com/mapbox/osmcha-frontend/issues).
97+
[read our contribution guide to file an issue](CONTRIBUTING.md).

0 commit comments

Comments
 (0)