Skip to content

Commit

Permalink
Fix for running optimizer when jquery is involved: in that case the d…
Browse files Browse the repository at this point in the history
…efine call in require-jquery.js does not have a callback, the AST parsing removed it, so need to check for existence before calling it. Small task/updatesubs.sh update too.
  • Loading branch information
jrburke committed May 14, 2011
1 parent 8ab98b0 commit 44fa98d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion require.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ var require, define;
loaded[fullName] = true;

//If module is jQuery set up delaying its dom ready listeners.
if (fullName === "jquery") {
if (fullName === "jquery" && callback) {
jQueryCheck(callback());
}
}
Expand Down
4 changes: 1 addition & 3 deletions tasks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ Release Notes
Next release
--------------

- https://github.com/jrburke/require-jquery: update readme for priority: the
priority call cannot be in the main.js file, does not work after optimizing.
- Add jqueryui-amd to updatesubs.sh, update it to use opto too.
- Update require-jquery to use opto, require-cs too.
- Add jqueryui-amd to updatesubs.sh, update it to use opto too.
- Test: node ../../r.js -o name=main out=main-built.js baseUrl=.
- implement require('.')

Expand Down
3 changes: 3 additions & 0 deletions updatesubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

echo "Updating r.js"
cp require.js ../r.js/require.js
cd ../r.js
node dist.js
cd ../requirejs

# The CoffeeScript loader plugin and example
echo "CoffeeScript plugin"
Expand Down

0 comments on commit 44fa98d

Please sign in to comment.