Permalink
Browse files

Extract developer documentation from README to CONTRIBUTE

  • Loading branch information...
1 parent 6907ad4 commit 5d4c2d226647449d490bba1fd1d70b3f5db33800 @jbpros jbpros committed Jun 22, 2012
Showing with 101 additions and 62 deletions.
  1. +99 −0 CONTRIBUTE.md
  2. +2 −62 README.md
View
@@ -0,0 +1,99 @@
+## Thank you!
+
+Before anything else, thank you. Thank you for taking some of your precious time helping this project move forward.
+
+This guide will help you get started with Cucumber.js's development environment. You'll also find the set of rules you're expected to follow in order to submit improvements and fixes to Cucumber.js.
+
+## Get started
+
+After forking and cloning the repository, install the required dependencies:
+
+ $ cd <path/to/cucumber-js>
+ $ npm link
+
+## Play
+
+ $ node example/server.js
+
+Then go to [localhost:9797](http://localhost:9797/) to see the little web demo.
+
+## Tests
+
+There are two set of tests resulting from the BDD approach we've been applying to Cucumber.js from the beginning.
+
+* full-stack tests (outside): surprisingly those are Gherkin scenarios;
+* unit tests (inside): jasmine specs.
+
+### Specs
+
+Run the specs:
+
+ $ node_modules/.bin/jasmine-node spec
+
+### Features & documentation
+
+There is a common set of features shared by all cucumber implementations. It's called the *Technology Compatibility Kit* or *TCK*. Find more on the [Cucumber TCK](http://github.com/cucumber/cucumber-tck) repository.
+
+The official way of running them is through Cucumber-ruby and Aruba. Ruby and Bundler are required for this to work.
+
+ $ git submodule update --init
+ $ bundle
+ $ rm -rf doc; ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
+
+*Note*: you need the *bcat* and *rdiscount* gems in order to use the `ARUBA_REPORT_DIR` environment variable. Install it with `gem install bcat rdiscount`.
+
+You can then open the generated documentation:
+
+ $ open doc/features/cucumber-tck/*.html # might open a lot of files ;)
+
+In addition to that, Cucumber.js is able to run the features for itself too:
+
+ $ ./bin/cucumber.js features/cucumber-tck -r features
+
+There are a few other Cucumber.js-dependent features. Execute everything:
+
+ $ ./bin/cucumber.js
+
+### Rake
+
+Alternatively, you can run everything with the help of Rake:
+
+ $ git submodule update --init
+ $ bundle
+ $ rake
+
+### Debug messages
+
+You can display debug messages by setting the DEBUG_LEVEL environment variable. It goes from `1` to `5`. `5` will display everything, `1` will only print out the critical things.
+
+ $ DEBUG_LEVEL=5 ./bin/cucumber.js
+
+It even works with Aruba:
+
+ $ rm -rf doc; DEBUG_LEVEL=5 ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
+ $ open doc/features/cucumber-tck/*.html # you'll see debug messages in Aruba-generated docs
+
+
+## Coding guidelines
+
+If you plan on submitting code, read this carefully. Please note it is not yet complete.
+
+We stick to the [Google JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
+
+In addition to those syntactic rules, we apply the following principles:
+
+### Write expressive method and function names
+
+Use expressive names. Express arguments as part of the method/function name. Someone calling it should be able to infer the expected arguments only from the name. They shouldn't have to check the method/function definition.
+
+``` javascript
+adorn(/* ... */) // BAD: it does not tell anything about its
+ // parameters, you'll need to read the method
+ // definition to know the arguments.
+
+addStyleToText(/* ... */) // you can fairly guess this function
+ // accepts "style" and "text" arguments:
+```
+
+** WORK IN PROGRESS **
+
View
@@ -371,69 +371,9 @@ A few example apps are available for you to browse:
* [Express.js app running features in the cli](https://github.com/olivoil/NodeBDD)
* [Try cucumber.js in the browser](http://cucumber.no.de/)
+## Contribute
-
-## Setup for using in Node.js and running tests
-
-Install the required dependencies:
-
- $ npm link
-
-## Play
-
- $ node example/server.js
-
-Then go to [localhost:9797](http://localhost:9797/).
-
-## Run tests
-
-### Specs
-
- $ node_modules/.bin/jasmine-node spec
-
-### Features & documentation
-
-There is a common set of features shared by all cucumber implementations. It's called the *Technology Compatibility Kit* or *TCK*. Find more on the [Cucumber TCK](http://github.com/cucumber/cucumber-tck) repository.
-
-The official way of running them is through Cucumber-ruby and Aruba. Ruby and Bundler are required for this to work.
-
- $ git submodule update --init
- $ bundle
- $ rm -rf doc; ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
-
-*Note*: you need the *bcat* and *rdiscount* gems in order to use the `ARUBA_REPORT_DIR` environment variable. Install it with `gem install bcat rdiscount`.
-
-You can then open the generated documentation:
-
- $ open doc/features/cucumber-tck/*.html # might open a lot of files ;)
-
-In addition to that, Cucumber.js is able to run the features for itself too:
-
- $ ./bin/cucumber.js features/cucumber-tck -r features
-
-There are a few other Cucumber.js-dependent features. Execute everything:
-
- $ ./bin/cucumber.js
-
-### Rake
-
-Alternatively, you can run everything with the help of Rake:
-
- $ git submodule update --init
- $ bundle
- $ rake
-
-### Debug messages
-
-You can display debug messages by setting the DEBUG_LEVEL environment variable. It goes from `1` to `5`. `5` will display everything, `1` will only print out the critical things.
-
- $ DEBUG_LEVEL=5 ./bin/cucumber.js
-
-It even works with Aruba:
-
- $ rm -rf doc; DEBUG_LEVEL=5 ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
- $ open doc/features/cucumber-tck/*.html # you'll see debug messages in Aruba-generated docs
-
+See [CONTRIBUTE](https://github.com/cucumber/cucumber-js/blob/master/CONTRIBUTE.md).
## Help & support

0 comments on commit 5d4c2d2

Please sign in to comment.