You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-9Lines changed: 2 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -31,13 +31,6 @@ JavaScript error message.
31
31
32
32
When in doubt, be over-descriptive of the bug and how you discovered it.
33
33
34
-
## How to login when running locally in development mode
34
+
---
35
35
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)
Copy file name to clipboardExpand all lines: README.md
+35-24Lines changed: 35 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -20,50 +20,58 @@ This repository uses [prettier](https://github.com/prettier/prettier) to keep th
20
20
- 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).
21
21
- Visual Studio Code users can Search for Prettier - JavaScript formatter.
22
22
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`.
24
27
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.
26
33
27
-
Runs the app in the development mode.
28
-
Open http://localhost:3000 to view it in the browser.
34
+
*To sign in:*
29
35
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.
30
40
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).
35
43
36
-
### Deploy/Release
44
+
```bash
45
+
yarn test
46
+
```
47
+
48
+
## Deploy/Release
37
49
- There are three stacks to deploy to
38
50
-`yarn deploy:dev` deploys it to `mapbox.github.io`
39
51
-`yarn deploy:staging` deploys it to `osmcha-django-staging.tilestream.net`
40
52
-`yarn deploy:prod` deploys it to `osmcha.mapbox.com`
41
53
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`
47
55
48
56
2. (optional) before deploy, you might want to increment the version number of application.
49
57
* We use `minor` for all non-drastic changes.
50
58
* The `patch` is reserved for minor changes.
51
59
* We try to stick to sem-ver.
52
-
```bash
53
-
npm version minor
54
-
```
60
+
```bash
61
+
npm version minor
62
+
```
55
63
56
64
57
65
3. Then build the app with the following command.
58
-
```bash
59
-
yarn build:<stack>
60
-
```
66
+
```bash
67
+
yarn build:<stack>
68
+
```
61
69
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
62
70
63
71
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
+
```
67
75
* here stack could be `dev`, `staging`, `prod`. Refer to package.json for more info.
68
76
*`oh-pages` branch handles the build for`staging`, `prod` stacks.
69
77
*`gh-pages` branch handles the build for`dev` stack.
@@ -82,5 +90,8 @@ yarn deploy:<stack>
82
90
* [OSMCha python library](https://github.com/willemarcel/osmcha) _(used to analyse the OSM changesets)_
83
91
* [osm-compare](https://github.com/mapbox/osm-compare) _(used to analyse the OSM features)_
84
92
93
+
94
+
## Issues and feature requests
95
+
85
96
If you have any error reports of want to request new features, please
0 commit comments