Skip to content

Instantly share code, notes, and snippets.

@romainl
Last active January 18, 2016 20:31
Show Gist options
  • Save romainl/bb048aef5d7fc8adcec6 to your computer and use it in GitHub Desktop.
Save romainl/bb048aef5d7fc8adcec6 to your computer and use it in GitHub Desktop.
Painless jQuery in a CommonJS context
module.exports = function() {
// install jQuery in the global scope
global.jQuery = global.$ = require("jquery");
}();
(function main() {
// require the jQuery bootloader
require("./jq");
// go on with the rest of your setup...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment