Skip to content

Commit 8cc636d

Browse files
lukeapagescottgonzalez
authored andcommitted
Docs: Clarify PHP Usage
Clarify that PHP is not required for testing, add a link to the CONTRIBUTING page and tidy up. Closes jquerygh-1418
1 parent 65584c1 commit 8cc636d

File tree

2 files changed

+47
-46
lines changed

2 files changed

+47
-46
lines changed

CONTRIBUTING.md

+41-26
Original file line numberDiff line numberDiff line change
@@ -16,68 +16,83 @@ This is the best way to contribute to jQuery UI. Please read through the full gu
1616

1717
Every week (unless otherwise noted) the jQuery UI team has a meeting to discuss the progress of current work and to bring forward possible new blockers for discussion. The meeting is held on [IRC](http://irc.jquery.org) in the #jquery-meeting channel at [Noon EST](http://www.timeanddate.com/worldclock/fixedtime.html?month=1&day=17&year=2011&hour=12&min=0&sec=0&p1=43) on Wednesdays. Meeting notes are posted on http://meetings.jquery.org/category/ui/ after each meeting.
1818

19-
## Tips For Bug Patching
19+
## Tips for Getting Started
2020

21-
### Environment: localhost w/ PHP, Node.js & Grunt
21+
### Environment: Minimum Required
2222

23-
jQuery UI uses Node.js & Grunt to automate the building and validation of source code.
23+
If you are contributing changes you will need a fork of jquery-ui (see [Getting the Source](#environment-getting-the-source)). If you just want the source code you could clone jquery-ui directly:
2424

25-
Some tests depend on PHP running locally, so make sure you have the following installed:
26-
27-
* A web server with PHP support (any will do, such as [XAMPP](http://www.apachefriends.org/en/xampp.html) or [MAMP](http://www.mamp.info/en/index.html))
28-
* [Node.js](http://nodejs.org/) (includes NPM, necessary for the next step)
29-
* Grunt (install with: `npm install -g grunt`)
25+
```bash
26+
git clone git://github.com/jquery/jquery-ui.git
27+
cd jquery-ui
28+
```
3029

31-
### Build a Local Copy of jQuery UI
30+
The tests can run in any local web server. Ideally you should test your patch in appropriate web browsers and if possible run `grunt` to lint the code and run automated tests (this will happen automatically when you create a pull request). See the [Recommended Setup](#environment-recommended-setup) for setting up Node.js so that the grunt command works.
3231

33-
Create a fork of the jQuery UI repo on GitHub at http://github.com/jquery/jquery-ui.
32+
### Environment: Getting the Source
3433

35-
Change directory to your web root directory, whatever that might be:
34+
* Create a fork of the jQuery UI repo on GitHub at http://github.com/jquery/jquery-ui. This will create a fork of jquery-ui in your Github account.
35+
* You may want to clone jquery-ui under the path to your web server. If so, change to the required directory
3636

3737
```bash
38-
$ cd /path/to/your/www/root/
38+
cd /path/to/your/www/root/
3939
```
4040

41-
Clone your jQuery UI fork to work locally.
42-
43-
*Note: be sure to replace `[USERNAME]` with your GitHub username.*
41+
* Clone your jQuery UI git repo.
4442

4543
```bash
46-
$ git clone [email protected]:[USERNAME]/jquery-ui.git
44+
git clone git://github.com/[USERNAME]/jquery-ui.git
45+
cd jquery-ui
4746
```
4847

49-
Change to the newly created directory.
48+
*Note: be sure to replace `[USERNAME]` with your GitHub username.*
49+
50+
* Add the official jQuery repository as a remote. We recommend naming it "upstream".
5051

5152
```bash
52-
$ cd jquery-ui
53+
git remote add upstream git://github.com/jquery/jquery-ui.git
5354
```
5455

55-
Add the official jQuery repository as a remote. We recommend naming it "upstream".
56+
* Get in the habit of pulling in the "upstream" master to stay up to date as jQuery UI receives new commits.
5657

5758
```bash
58-
$ git remote add upstream git://github.com/jquery/jquery-ui.git
59+
git pull upstream master
5960
```
6061

61-
Get in the habit of pulling in the "upstream" master to stay up to date as jQuery UI receives new commits.
62+
### Environment: Recommended Setup
63+
64+
jQuery UI uses Node.js & Grunt to automate the building and validation of source code. Here is how to set that up:
65+
66+
* Get [Node.js](http://nodejs.org/) (includes NPM, necessary for the next step)
67+
* Install Grunt cli:
6268

6369
```bash
64-
$ git pull upstream master
70+
npm install -g grunt-cli
6571
```
6672

67-
Install the dependencies.
73+
* Install local Node.js modules
6874

6975
```bash
7076
npm install
7177
```
7278

79+
The tests require a local web server and the samples contain some PHP, so a PHP web server may be useful.
80+
81+
* Install a web server. Here are some you could use:
82+
* Windows: [WAMP download](http://www.wampserver.com/en/)
83+
* Mac: [MAMP download](http://www.mamp.info/en/index.html)
84+
* Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
85+
* [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
86+
* [http-server](https://www.npmjs.com/package/http-server)
87+
88+
### Running the Tests
89+
7390
To lint the JavaScript, HTML, and CSS, as well as run a smoke test in PhantomJS, run grunt:
7491

7592
```bash
76-
$ grunt
93+
grunt
7794
```
7895

7996
To run the tests for a specific plugin in your browser, open the appropriate file from the `/tests/unit/` directory, for example: `http://localhost/tests/unit/accordion/accordion.html`. The domain will be dependent on your local server configuration; if there is a port, be sure to include it.
8097

8198
Ideally you would test in all of our [supported browsers](http://jqueryui.com/browser-support/), but if you don't have all of these browsers available, that's ok.
82-
83-
Make sure to read our [commits and pull requests documentation](http://dev.contribute.jquery.org/commits-and-pull-requests/) for full details on working with branches and forks, as well as our commit guidelines.

README.md

+6-20
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you are interested in helping develop jQuery UI, you are in the right place.
1010
To discuss development with team members and the community, visit the [Developing jQuery UI Forum](http://forum.jquery.com/developing-jquery-ui) or [#jqueryui-dev on irc.freenode.net](http://irc.jquery.org/).
1111

1212

13-
## For contributors
13+
## For Contributors
1414

1515
If you want to help and provide a patch for a bugfix or new feature, please take
1616
a few minutes and look at [our Getting Involved guide](http://wiki.jqueryui.com/w/page/35263114/Getting-Involved).
@@ -21,35 +21,21 @@ In general, fork the project, create a branch for a specific change and send a
2121
pull request for that branch. Don't mix unrelated changes. You can use the commit
2222
message as the description for the pull request.
2323

24+
For more information, see the [contributing page](CONTRIBUTING.md).
2425

2526
## Running the Unit Tests
2627

27-
Run the unit tests with a local server that supports PHP. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:
28-
29-
- Windows: [WAMP download](http://www.wampserver.com/en/)
30-
- Mac: [MAMP download](http://www.mamp.info/en/index.html)
31-
- Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
32-
- [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
28+
Run the unit tests manually with appropriate browsers and any local web server. See our [environment setup](CONTRIBUTING.md#environment-minimum-required) and [information on running tests](CONTRIBUTING.md#running-the-tests).
3329

30+
You can also run the unit tests inside phantomjs by [setting up your environment](CONTRIBUTING.md#user-content-environment-recommended-setup).
3431

3532
## Building jQuery UI
3633

37-
jQuery UI uses the [Grunt](http://github.com/gruntjs/grunt) build system.
34+
jQuery UI uses the [Grunt](http://gruntjs.com/) build system.
3835

39-
To build jQuery UI, you must have [node.js](http://nodejs.org/) installed and then run the following commands:
36+
To build jQuery UI, [setup your environment]([setting up your environment](CONTRIBUTING.md#environment-minimum-required)) and then run the following commands:
4037

4138
```sh
42-
43-
# Install the Grunt CLI
44-
npm install -g grunt-cli
45-
46-
# Clone the jQuery UI git repo
47-
git clone git://github.com/jquery/jquery-ui.git
48-
cd jquery-ui
49-
50-
# Install the node module dependencies
51-
npm install
52-
5339
# Run the concat task to concatenate files
5440
grunt concat
5541

0 commit comments

Comments
 (0)