Skip to content

Commit

Permalink
update READMEs, CONTRIBUTING, and package.jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Feb 18, 2017
1 parent 600b3f3 commit 8b7b73d
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 430 deletions.
58 changes: 54 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
# Contributing
Contributing
===

## Getting started
Want to contribute to PouchDB Server? Great, you've come to the right place!
This document contains everything you need to know to get started building,
testing, and publishing the code.

Monorepo
---

PouchDB Server is a monorepo, containing the packages `pouchdb-server` and `express-pouchdb`. It follows the same format as the [PouchDB monorepo](https://github.com/pouchdb/pouchdb), using the [alle](https://github.com/boennemann/alle) monorepo setup. You can read more about monorepos [here](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) and [here](https://gist.github.com/nolanlawson/457cdb309c9ec5b39f0d420266a9faa4).

Conceptually `pouchdb-server` is a standalone CouchDB-esque server, whereas
`express-pouchdb` is designed to be injectable into an existing Express app.
`pouchdb-server` uses `express-pouchdb` under the hood.

Testing
---

One of the primary benefits of **pouchdb-server** is the ability to run PouchDB's Node test suite against itself. To do that, you can simply,

```bash
$ npm run test-pouchdb
```

Whatever args you provide as `SERVER_ARGS` will be passed to `pouchdb-server` itself:

```bash
$ SERVER_ARGS='--in-memory' npm run test-pouchdb
```

Or to test in Firefox (IndexedDB):

```bash
$ CLIENT=selenium:firefox npm run test-pouchdb
```

Or to test in PhantomJS (WebSQL):

```bash
$ CLIENT=selenium:phantomjs ES5_SHIM=true npm run test-pouchdb
```

Additionally, we've started porting CouchDB's JavaScript test harness to
[a simple Node module](https://github.com/nick-thompson/couchdb-harness), which can be run against PouchDB via **pouchdb-server**.

```bash
$ npm run test-couchdb
```

## Submitting a pull request

Want to help me make this thing awesome? Great! Here's how you should get started.

Expand All @@ -12,10 +60,12 @@ Want to help me make this thing awesome? Great! Here's how you should get starte

## Release process

`pouchdb-server` is a monorepo, meaning that when you publish, you need to publish all packages simultaneously. Versions are kept in sync for simplicity's sake.
`pouchdb-server` is a monorepo, meaning that when you publish, you need to publish all packages simultaneously. Versions are kept in sync across packages, for simplicity's sake.

Release process:

1. `npm version patch | minor | major` to change the version in the top-level `package.json`, which will apply to all packages in the release script
2. `git push origin master --tags`
3. `npm run release`
3. `npm run release`

This will search through all the sub-packages and automatically figure out the correct `dependencies` and `optionalDependencies`. To add a new dependency, just add it to the top-level `package.json` and it will be identified at release time.
Loading

0 comments on commit 8b7b73d

Please sign in to comment.