Latest jQuery (currently 2.0.0b2) with jQuery-Migrate plugin wrapped for Node.js and a browser (window globals, Browserify or AMD)
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.jshintignore
.jshintrc
.rvmrc
.travis.yml
Gemfile
Gemfile.lock
LICENSE-MIT.md JSHint, Travis, API idea Mar 26, 2013
README.md AMD support Mar 28, 2013
build.js Added query-migrate Mar 26, 2013
download.js
index.js
jquery-migrate.js
jquery.js
package.json
sourcelabs.js.template
test.js
wrap.js

README.md

jQuery+Migrate

Latest jQuery (currently 2.0.0b2) with jQuery-Migrate plugin wrapped for Node.js and a browser (window globals, Browserify or AMD).

Build Status Dependency Status Dependency Status Selenium Test Status

Use in Node:

// jQuery in an empty document
var $ = require('jquery-with-migrate');

// jQuery in a custom window (from jsdom)
var $ = require('jquery-with-migrate').create(window);

Use with Browserify:

// returns jQuery within a current window 
var $ = require('jquery-with-migrate');

// globals are still defined
console.log($ === window.jQuery);

Use with AMD:

  1. Run jQuery+Migrate through Browserify:

    browserify -r jquery-with-migrate > jquery-with-migrate.js
    
  2. Use it in other AMD modules (exposed as 'jquery'):

    define(['jquery'], function ($) {
        console.log($ === window.jQuery);
    });
    

Installing on Windows:

Since jQuery+Migrate relies on jsdom that in turn depends on contextify it's important to have compiler toolchain properly installed on you machine. The easiest way to do it on Windows is to install:

  1. Python 2.7.3, either directly from python.org, or as a Chocolatey package.
  2. Visual Studio 2012 Express for Windows Desktop (it's free and comes with Windows SDK). Make sure you install it and all the updates. It's pretty heavy (> 2 GiB), but you don't have another option at the moment.

Alternatively (if you're on Windows Vista or any older version) you can try installing Visual C++ 2010 Express and the corresponding version of Windows SDK (for Windows 7 that's "Microsoft Windows SDK for Windows 7 and .NET Framework 4").