Top "Requirejs" questions

RequireJS is a JavaScript file and module loader.

Calling methods in RequireJs modules from HTML elements such as onclick handlers

I'm changing a project from an "old" browser-style module structure to a "new" browser-or-server-side-javascript module structure with require.js. On …

javascript html module requirejs
What's the difference between Require.js and simply creating a <script> element in the DOM?

What's the difference between using Require.JS amd simply creating a <script> element in the DOM? My understanding …

javascript requirejs dynamic-script-loading js-amd
How do I use jquery ui with requirejs

I want to use jQuery UI's addClass function in my application. Beside I am using the normal jQuery, underscore, backbone …

javascript jquery-ui requirejs
require.js synchronous loading

I'd like to define a module which computes a new dependancy, fetches it and then returns the result. Like so: …

import module requirejs synchronous
How can I mock dependencies for unit testing in RequireJS?

I have an AMD module I want to test, but I want to mock out its dependencies instead of loading …

javascript unit-testing mocking requirejs
Using RequireJS, how do I pass in global objects or singletons around?

Let's say I am writing code at the main page level and 2 dependencies require the same instance of an object …

javascript singleton requirejs
Getting 'Uncaught Error: Script error' for a declared dependency when using r.js

I couldn't find an answer for my issue on SO or Github, so I am posting this: I created a …

requirejs r.js
How do I JSDoc A Nested Object's Methods?

I've been trying to use JSDoc3 to generate documentation on a file, but I'm having some difficulty. The file (which …

javascript requirejs jsdoc jsdoc3
Catching module loading errors and processing them

I am trying to load some content using require.js. If the content doesn't exist I'd like to catch the …

javascript requirejs
RequireJS - pass parameters into module for initialization

Possible Duplicate: How to load bootstrapped models in Backbone.js while using AMD (require.js) I am currently creating a …

javascript module requirejs amd