Skip to content

Commit

Permalink
Add getting started to contributing.md (redfin#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-wade authored and davidalber committed Jul 24, 2016
1 parent 6994380 commit c3ce0cd
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,61 @@ You could:

Not sure where to start? Join us [on gitter](https://gitter.im/redfin/react-server) and ask!

## Getting started

React Server uses a tool called [lerna](https://www.npmjs.com/package/lerna) to
manage the entire React Server ecosystem in a single repository. This allows
maintainers to know that everything works together well, without having to know
all of the inner workings of each package in the monorepo. It does present some
challenges to new developers, since the idea is relatively new. If you want to
know more about why we chose a monorepo, check out the [babel monorepo design
doc](https://github.com/babel/babel/blob/master/doc/design/monorepo.md),
especially the [previous discussion](https://github.com/babel/babel/blob/master/doc/design/monorepo.md#previous-discussion).

To get your local clone into working order, run an

```
npm run bootstrap
```

If things get hairy and you have errors that you don't understand, you can get
a clean install of all the dependencies

```
npm run nuke
npm run bootstrap
```

If you've been running `bootstrap` to track down build errors a lot, and have a
lot of debug files lying around, you can clean them up

```
npm run clean
```

Most commands have a corresponding `lerna` command; if you want to find out more,
you can look at the `scripts` hash in the root `package.json`, check out the
[lerna docs](lernajs.io), and run the lerna commands yourself

```
npm i -g lerna david
lerna clean
lerna bootstrap
lerna run lint
lerna exec -- david u
```

You can also work on a single package by `cd`-ing into that module, and using
normal `npm` scripts

```
cd packages/generator-react-server
npm i
npm test
```

but you should still run a full monorepo build and test before submitting a pr.

## Testing

Yeah! Do it!
Expand Down

0 comments on commit c3ce0cd

Please sign in to comment.