Debian Codegraph @

CONTRIBUTING.md

raw symbols SCIP
1 # Contributing to jQuery UI
2
3 Welcome! Thanks for your interest in contributing to jQuery UI. Most of our information on how to contribute to this and all other jQuery projects is over at [contribute.jquery.org](https://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [code](https://contribute.jquery.org/code).
4
5 You may also want to take a look at our [commit & pull request guide](https://contribute.jquery.org/commits-and-pull-requests/) and [style guides](https://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](https://contribute.jquery.org/cla).
6
7 You can find us on [IRC](https://irc.jquery.org), specifically in #jqueryui-dev should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](https://contribute.jquery.org/open-source/). For other forms of discussion and support, please see the [jQuery UI support center](https://jqueryui.com/support/).
8
9 ## Getting Involved
10
11 There are a number of ways to get involved with the development of jQuery UI. Even if you've never contributed code to an Open Source project before, we're always looking for help identifying bugs, writing and reducing test cases and documentation.
12
13 This is the best way to contribute to jQuery UI. Please read through the full guide detailing [How to Report Bugs](https://contribute.jquery.org/bug-reports/).
14
15 ## Tips for Getting Started
16
17 ### Environment: Minimum Required
18
19 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:
20
21 ```bash
22 git clone git://github.com/jquery/jquery-ui.git
23 cd jquery-ui
24 ```
25
26 The tests can run in any local web server. Ideally you should test your patch in appropriate web browsers and if possible run `npm test` 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 `npm test` command works.
27
28 ### Environment: Getting the Source
29
30 * Create a fork of the jQuery UI repo on GitHub at https://github.com/jquery/jquery-ui. This will create a fork of jquery-ui in your Github account.
31 * You may want to clone jquery-ui under the path to your web server. If so, change to the required directory
32
33 ```bash
34 cd /path/to/your/www/root/
35 ```
36
37 * Clone your jQuery UI git repo.
38
39 ```bash
40 git clone git://github.com/[USERNAME]/jquery-ui.git
41 cd jquery-ui
42 ```
43
44 *Note: be sure to replace `[USERNAME]` with your GitHub username.*
45
46 * Add the official jQuery repository as a remote. We recommend naming it "upstream".
47
48 ```bash
49 git remote add upstream git://github.com/jquery/jquery-ui.git
50 ```
51
52 * Get in the habit of pulling in the "upstream" main branch to stay up to date as jQuery UI receives new commits.
53
54 ```bash
55 git pull upstream main
56 ```
57
58 ### Environment: Recommended Setup
59
60 jQuery UI uses Node.js to automate the building and validation of source code. Here is how to set that up:
61
62 * Get [Node.js](https://nodejs.org/) (includes NPM, necessary for the next step)
63 * Install local Node.js modules
64
65 ```bash
66 npm install
67 ```
68
69 The tests require a local web server and the samples contain some PHP, so a PHP web server may be useful.
70
71 * Install a web server. Here are some you could use:
72 * Windows: [WAMP download](https://www.wampserver.com/en/)
73 * Mac: [MAMP download](https://www.mamp.info/en/mac/)
74 * Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
75 * [Mongoose (most platforms)](https://mongoose.ws/)
76 * [http-server](https://www.npmjs.com/package/http-server)
77
78 ### Running the Tests
79
80 To lint the JavaScript, HTML, and CSS, as well as run the full test suite in Headless Chrome:
81
82 ```bash
83 npm test
84 ```
85
86 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.
87
88 Ideally you would test in all of our [supported browsers](https://jqueryui.com/browser-support/), but if you don't have all of these browsers available, that's ok.