add contribute guidelines

This commit is contained in:
fengmk2
2014-04-09 09:58:23 +08:00
parent 1b266d527c
commit cb4d4f51dd
2 changed files with 49 additions and 10 deletions

39
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,39 @@
# How to contribute
Third-party patches are essential for keeping `cnpmjs.org` great.
We want to keep it as easy as possible to contribute changes that
get things working in your environment. There are a few guidelines that we
need contributors to follow so that we can have a chance of keeping on
top of things.
## Getting Started
* Make sure you have a [GitHub account](https://github.com/signup/free)
* Fork the repository on GitHub
## Making Changes
* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master.
Please avoid working directly on the `master` branch.
* Make commits of logical units and including unit tests.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format.
* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.
* Follow [node style guide](https://github.com/felixge/node-style-guide)
## Submitting Changes
* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request.
* Make sure travis-ci test pass.
# Additional Resources
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* [cnpmjs.org](http://cnpmjs.org)

View File

@@ -46,12 +46,12 @@ only need to change the registry in config. Even include manual synchronization
![cnpm](https://docs.google.com/drawings/d/12QeQfGalqjsB77mRnf5Iq5oSXHCIUTvZTwECMonqCmw/pub?w=480&h=360)
## Develop
## Develop on your local machine
### Dependencies
* [node](http://nodejs.org) >=0.11.9
* [mysql](http://dev.mysql.com/downloads/), include `mysqld` and `mysql cli`
* [mysql](http://dev.mysql.com/downloads/) >= 0.5.0, include `mysqld` and `mysql cli`. I test on `mysql@5.6.16`.
### Start MySQL
@@ -63,9 +63,9 @@ $ nohup mysqld &
```bash
# clone from git
$ git clone git@github.com:cnpm/cnpmjs.org.git
$ git clone https://github.com/cnpm/cnpmjs.org.git
# install dependencise
# install dependencies
$ make install
# test
@@ -78,15 +78,15 @@ $ make test-cov
$ make autod
# start server
$ node --harmony-generators dispatch.js
$ node --harmony dispatch.js
```
## Contribute
## How to contribute
* clone the project
* checkout a new branch
* add new features or fix bugs in the new branch
* make a pull request and we will review it ASAP
* Clone the project
* Checkout a new branch
* Add new features or fix bugs in the new branch
* Make a pull request and we will review it ASAP
Tips: make sure your code is follow the [node-style-guide](https://github.com/felixge/node-style-guide).