| Page 1 of 1 | [ 7 posts ] |
|
Code: var yuiloader = new window.YAHOO.util.YUILoader(); // Load YUI in a sandboxed environment. yuiloader.sandbox({ require: ['animation', 'connection', 'container', 'cookie', 'dom', 'dragdrop', 'element', 'event', 'json', 'logger', 'yahoo'], When the builder runs the -loggerregex target, it destroys that bit of code. And I end up with: Code: var yuiloader = new window.YAHOO.util.YUILoader(); // Load YUI in a sandboxed environment. yuiloader.sandbox({ require: ['animation', 'connection', 'container', 'cookie', 'dom', 'dragdrop', 'element', 'event', 'json', What am I doing wrong? |
|
And actually, I think it's a little harsher than my example shows because it deletes everything up to the next semicolon. Since this is in an Object Literal, there is more stuff defined after the require property.
|
|
I can obviously skip the loggerregex step by setting component.logger.regex.skip=true in the build.properties file. I'm hoping to find some explanation, though, about how to implement logger but still strip it out in the production version.
|
|
This problem hit me today as well...lots of hair pulling until I realized the builder was stripping it. I suppose one way would be to load it through an alias in the YUI statement...I'm not somewhere I can test this at the moment, but theoretically something like this might work (as a workaround):
Code: YUI({ modules: { myLogger: { fullpath: 'path/to/logger' } } }).use(..., function(Y) { }); ...and then "require" myLogger in your code. Sorry this is set out for YUI 3...I never got that far into YUI 2 before I was sucked into 3's awesome modularity |
|
I am having the same problem with my logger? any help would be greatly appreciated !!
|
Bob C. Davis
|
Same thing anyone know the answer?
|
|
Considering switching the regex to:
Code: "^\s*(YAHOO.log|Y.log|console.log)\s*?\(.*\);\r?\n" this is safer, but assumes statements are on separate lines, which isn't always the case. |
| Page 1 of 1 | [ 7 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group