Closed ghost closed 12 years ago
Even if I bring in curl before jquery, I suddenly have no $.location
defined.
I'm using the one explicitly labeled curl-for-jQuery
.
Hey @khiltd,
I'm not seeing this problem. Actually, I'm not sure what $.location is. I see other properties on the $ object, though. Can you elaborate or post a code sample?
Thanks!
-- John
Absolutely:
<!DOCTYPE html>
<html>
<head>
<title>Curl's Broken</title>
<script type="text/javascript" src="/js/jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/curl.js/dist/curl-for-jQuery/curl.js"> </script>
<script type="text/javascript">
(function()
{
var test = $.Deferred()
console.log(test)
})();
</script>
</head>
<body>
</body>
</html>
Watch the console spew as curl jacks up jQuery.
Reverse the order, and suddenly it works. This is highly undesirable behavior.
As for what $.location
is: I'm not too sure myself. It's in the curl.js source and comes up undefined.
.fixSchemalessUrls:$.location.protocol)?a.replace(ua,c+"//"):
This appears to be an issue with closure compiler. I found a way to prevent it from clobbering $, but I'm concerned that it's also spitting out dozens of global vars now.
Interesting. I always stick to the less-intelligent minifiers.
One thing that would be tremendously useful is if the build script took a flag telling it whether or not to minify at all so those of us who are merely tourists in the source base can more readily debug such things ourselves and opt to use alternate means of compression if we so desire.
Interesting. I always stick to the less-intelligent minifiers.
words of wisdom :)
Found the new closure compiler "feature": http://code.google.com/p/closure-compiler/wiki/FAQ#When_using_Advanced_Optimizations,_Closure_Compiler_adds_new_var
One thing that would be tremendously useful is if the build script took a flag telling it whether or not to minify at all so those of us who are merely tourists in the source base can more readily debug such things ourselves and opt to use alternate means of compression if we so desire.
yah, it's hard-coded into compile.sh atm. Those files are supposed to be temporary until the "real" optimizer is ready. :)
I don't know what went on in the past few months since I last pulled an update, but the current version is just breaking everything left and right.