[jQuery](https://jquery.com/) — New Wave JavaScript ================================================== Meetings are currently held on the [matrix.org platform](https://matrix.to/#/#jquery_meeting:gitter.im). Meeting minutes can be found at [meetings.jquery.org](https://meetings.jquery.org/category/core/). 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](https://contribute.jquery.org/) 2. [Core Style Guide](https://contribute.jquery.org/style-guide/js/) 3. [Writing Code for jQuery Projects](https://contribute.jquery.org/code/) ### References to issues/PRs GitHub issues/PRs are usually referenced via `gh-NUMBER`, where `NUMBER` is the numerical ID of the issue/PR. You can find such an issue/PR under `https://github.com/jquery/jquery/issues/NUMBER`. jQuery has used a different bug tracker - based on Trac - in the past, available under [bugs.jquery.com](https://bugs.jquery.com/). It is being kept in read only mode so that referring to past discussions is possible. When jQuery source references one of those issues, it uses the pattern `trac-NUMBER`, where `NUMBER` is the numerical ID of the issue. You can find such an issue under `https://bugs.jquery.com/ticket/NUMBER`. Environments in which to use jQuery -------------------------------------- - [Browser support](https://jquery.com/browser-support/) - jQuery also supports Node, browser extensions, and other non-browser environments. What you need to build your own jQuery -------------------------------------- To build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. Earlier versions might work, but are not supported. For Windows, you have to download and install [git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/en/download/). macOS users should install [Homebrew](https://brew.sh/). 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 the jQuery git repo](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository). Then, enter the jquery directory, install dependencies, and run the build script: ```bash cd jquery npm install npm run build ``` The built version of jQuery will be placed in the `dist/` directory, along with a minified copy and associated map file. ## Build all jQuery release files To build all variants of jQuery, run the following command: ```bash npm run build:all ``` This will create all of the variants that jQuery includes in a release, including `jquery.js`, `jquery.slim.js`, `jquery.module.js`, and `jquery.slim.module.js` along their associated minified files and sourcemaps. `jquery.module.js` and `jquery.slim.module.js` are [ECMAScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) that export `jQuery` and `$` as named exports are placed in the `dist-module/` directory rather than the `dist/` directory. ## Building a Custom jQuery The build script can be used to create a custom version of jQuery that includes only the modules you need. Any module may be excluded except for `core`. When excluding `selector`, it is not removed but replaced with a small wrapper around native `querySelectorAll` (see below for more information). ### Build Script Help To see the full list of available options for the build script, run the following: ```bash npm run build -- --help ``` ### Modules To exclude a module, pass its path relative to the `src` folder (without the `.js` extension) to the `--exclude` option. When using the `--include` option, the default includes are dropped and a build is created with only those modules. Some example modules that can be excluded or included 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 `