Skip to content

Commit

Permalink
Added proper useSync to the YUI module itself
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Nov 20, 2010
1 parent de4e2e4 commit 184e769
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions examples/sync-mod.js
@@ -0,0 +1,7 @@
#!/usr/bin/env node
var Y = require('./sync-module');

Y.YQL('select * from github.user.info where (id = "davglass")', function(r) {
//Do something here.
Y.log(r.query, 'debug', 'yql');
});
4 changes: 1 addition & 3 deletions examples/sync-module.js
Expand Up @@ -2,8 +2,6 @@

var YUI = require("yui3").YUI;

YUI.loadSync = true;

YUI({
filter: 'debug',
_logExclude: {
Expand All @@ -16,7 +14,7 @@ YUI({
'event': true
},
debug: true
}).use('yql', function(Ysync) {
}).useSync('yql', function(Ysync) {

module.exports = Ysync;

Expand Down
5 changes: 5 additions & 0 deletions lib/node-yui3.js
Expand Up @@ -258,6 +258,11 @@ YUI.prototype.fetch = function(url, o) {

};

YUI.prototype.useSync = function() {
YUI.loadSync = true;
return this.use.apply(this, arguments);
}

YUI.prototype.__use = YUI.prototype.use;

YUI.prototype.use = function() {
Expand Down

0 comments on commit 184e769

Please sign in to comment.