aboutsummaryrefslogtreecommitdiffstats
[jQuery](http://jquery.com/) - New Wave JavaScript ================================================== Contribution Guides -------------------------------------- In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly: 1. [Getting Involved](http://docs.jquery.com/Getting_Involved) 2. [Core Style Guide](http://docs.jquery.com/JQuery_Core_Style_Guidelines) 3. [Tips For Bug Patching](http://docs.jquery.com/Tips_for_jQuery_Bug_Patching) What you need to build your own jQuery -------------------------------------- In order to build jQuery, you need to have Node.js/npm latest and git 1.7 or later. (Earlier versions might work OK, but are not tested.) Windows users have two options: 1. Install [msysgit](https://code.google.com/p/msysgit/) (Full installer for official Git) and a [binary version of Node.js](http://nodejs.org). Make sure all two packages are installed to the same location (by default, this is C:\Program Files\Git). 2. Install [Cygwin](http://cygwin.com/) (make sure you install the git and which packages), and a [binary version of Node.js](http://nodejs.org/). Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from [Apple's Xcode site](http://developer.apple.com/technologies/xcode.html)) and [Homebrew](http://mxcl.github.com/homebrew/). Once Homebrew is installed, run `brew install git` to install git, and `brew install node` to install Node.js. Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source if you swing that way. Easy-peasy. How to build your own jQuery ---------------------------- First, clone a copy of the main jQuery git repo by running: ```bash git clone git://github.com/jquery/jquery.git ``` Install the grunt-cli package so that you will have the correct version of grunt available from any project that needs it. This should be done as a global install: ```bash npm install -g grunt-cli ``` Enter the jquery directory and install the Node dependencies, this time *without* specifying a global install: ```bash cd jquery && npm install ``` Make sure you have `grunt` installed by testing: ```bash grunt -version ``` Then, to get a complete, minified (w/ Uglify.js), linted (w/ JSHint) version of jQuery, type the following: ```bash grunt ``` The built version of jQuery will be put in the `dist/` subdirectory, along with the minified copy and associated map file. ### Modules Special builds can be created that exclude subsets of jQuery functionality. This allows for smaller custom builds when the builder is certain that those parts of jQuery are not being used. For example, an app that only used JSONP for `$.ajax()` and did not need to calculate offsets or positions of elements could exclude the offset and ajax/xhr modules. The current modules that can be excluded are: - **ajax**: All AJAX functionality: `$.ajax()`, `$.get()`, `$.post()`, `$.ajaxSetup()`, `.load()`, transports, and ajax event shorthands such as `.ajaxStart()`. - **ajax/xhr**: The XMLHTTPRequest AJAX transport only. - **ajax/script**: The `