Skip to content

Commit

Permalink
Fixed JSON call in a YUI 3.5 compliant manner
Browse files Browse the repository at this point in the history
(cherry picked from commit a5172cc)
  • Loading branch information
add0n authored and Isao Yagi committed Jun 8, 2012
1 parent 4b05b29 commit d4b9c54
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 18 deletions.
3 changes: 2 additions & 1 deletion source/lib/app/middleware/mojito-handler-tunnel.js
Expand Up @@ -11,7 +11,8 @@
var liburl = require('url'),
logger,
RX_MULTI_SLASH_ALL = /\/+/g,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});


function trimSlash(str) {
Expand Down
3 changes: 2 additions & 1 deletion source/lib/app/middleware/mojito-router.js
Expand Up @@ -12,7 +12,8 @@ var logger,
liburl = require('url'),
RX_END_SLASHES = /\/+$/,
NAME = 'UriRouter',
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});


function simpleMerge(to, from) {
Expand Down
4 changes: 2 additions & 2 deletions source/lib/management/commands/build.js
Expand Up @@ -19,8 +19,8 @@ var libpath = require('path'),
mkdirP,
rmdirR,
writeWebPagesToFiles,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

/**
* The usage string for this command.
Expand Down
3 changes: 2 additions & 1 deletion source/lib/management/commands/compile.js
Expand Up @@ -39,7 +39,8 @@ var path = require('path'),
options,
run,
YuiModuleCacher,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});


usage = 'mojito compile {options} {type}\n' +
Expand Down
4 changes: 2 additions & 2 deletions source/lib/management/commands/create.js
Expand Up @@ -32,8 +32,8 @@ var utils = require('../utils'),
'while', 'with'
],
usage,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

usage = 'mojito create {type} [archetype] {name} [options]\n' +
"\t- type: 'app', 'mojit', or 'project'\n" +
Expand Down
3 changes: 2 additions & 1 deletion source/lib/management/commands/info.js
Expand Up @@ -11,7 +11,8 @@
var fs = require('fs'),
path = require('path'),
utils = require('../utils'),
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});


/**
Expand Down
3 changes: 2 additions & 1 deletion source/lib/management/commands/start.js
Expand Up @@ -11,7 +11,8 @@
var path = require('path'),
utils = require('../utils'),
fs = require('fs'),
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});


/**
Expand Down
3 changes: 2 additions & 1 deletion source/lib/management/commands/test.js
Expand Up @@ -53,7 +53,8 @@ var pathlib = require('path'),
options,
inputOptions,
runTests,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');
Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

// OSX's /tmp directory is a symbolic link to /private/tmp, and we want to use
// the real directory string
Expand Down
4 changes: 2 additions & 2 deletions source/lib/management/commands/version.js
Expand Up @@ -12,8 +12,8 @@ var fs = require('fs'),
path = require('path'),
utils = require('../utils'),
usage = 'mojito version [app | mojit] [<name>]',
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

/*
* Report the Mojito version, as obtained from the package.json file for the
Expand Down
4 changes: 2 additions & 2 deletions source/lib/management/yui-module-configurator.js
Expand Up @@ -15,8 +15,8 @@ var fs = require('fs'),
walkDir,
updateModulesWithFile,
isExcluded,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

walkDir = function(dir, modules, excludes) {
// console.log("Walking " + dir);
Expand Down
4 changes: 2 additions & 2 deletions source/lib/package-walker.server.js
Expand Up @@ -12,8 +12,8 @@

var libpath = require('path'),
libfs = require('fs'),
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

function copy(x) {
if (!x) {
Expand Down
4 changes: 2 additions & 2 deletions source/lib/server-log.js
Expand Up @@ -27,8 +27,8 @@ var tty = require('tty'),
bland,
formatter,
options,
Y = require('yui3').YUI().useSync('json-parse', 'json-stringify');

Y = require('yui').YUI({useSync: true}).use('json-parse', 'json-stringify');
Y.applyConfig({useSync: false});

writer = function(data) {
var i;
Expand Down

0 comments on commit d4b9c54

Please sign in to comment.