1 | ## Developing
|
2 |
|
3 | - Clone a copy of this project
|
4 | - Change into the project directory from the terminal and install dependencies via `npm install`.
|
5 | - Add your credentials as options when instantiating `TeamDirectory`. See this projects [index][] as example and read [Getting started][] to learn more.
|
6 | - Run `npm start` to start a server on `http://localhost:9966/`.
|
7 |
|
8 | [Getting started]: https://github.com/mapbox/team-directory/blob/master/GETTING_STARTED.md
|
9 | [index]: https://github.com/mapbox/team-directory/blob/master/index.html
|
10 |
|
11 | ## Tests
|
12 |
|
13 | To run tests locally, you'll need create a writeable file called `.env.sh` with
|
14 | the following contents:
|
15 |
|
16 | ```sh
|
17 | export GitHubToken="GITHUB TOKEN"
|
18 | export account="ACCOUNT NAME"
|
19 | export repo="REPO NAME"
|
20 | export team="TEAM FILENAME"
|
21 | export form="FORM FILENAME"
|
22 | ```
|
23 |
|
24 | _Note:_ you can optionally add `export branch="BRANCH NAME"` if test data lies in a
|
25 | specific branch.
|
26 |
|
27 | Run tests via
|
28 |
|
29 | npm run test-local
|
30 |
|
31 | ## Deploying
|
32 |
|
33 | - `git run build`
|
34 | - Commit the build to git and push
|
35 | - `git tag -a vX.X.X -m 'vX.X.X'`
|
36 | - `git push --tags`
|
37 | - `npm publish`
|