Skip to content

Commit a402e2b

Browse files
committed
snapshot
1 parent 90de414 commit a402e2b

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

dist/r.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.1.1+ Tue, 20 Nov 2012 03:36:45 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.1.1+ Tue, 20 Nov 2012 04:04:09 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -21,7 +21,7 @@ var requirejs, require, define;
2121

2222
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
2323
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode,
24-
version = '2.1.1+ Tue, 20 Nov 2012 03:36:45 GMT',
24+
version = '2.1.1+ Tue, 20 Nov 2012 04:04:09 GMT',
2525
jsSuffixRegExp = /\.js$/,
2626
commandOption = '',
2727
useLibLoaded = {},
@@ -19506,17 +19506,35 @@ define('parse', ['./esprima'], function (esprima) {
1950619506

1950719507
if (arg && arg.type === 'ObjectExpression') {
1950819508
jsConfig = parse.nodeToString(fileContents, arg);
19509-
foundConfig = eval('(' + jsConfig + ')');
19509+
return false;
19510+
}
19511+
} else {
19512+
arg = parse.getRequireObjectLiteral(node);
19513+
if (arg) {
19514+
jsConfig = parse.nodeToString(fileContents, arg);
1951019515
return false;
1951119516
}
1951219517
}
19513-
19514-
1951519518
});
1951619519

19520+
if (jsConfig) {
19521+
foundConfig = eval('(' + jsConfig + ')');
19522+
}
19523+
1951719524
return foundConfig;
1951819525
};
1951919526

19527+
/** Returns the node for the object literal assigned to require/requirejs,
19528+
* for holding a declarative config.
19529+
*/
19530+
parse.getRequireObjectLiteral = function (node) {
19531+
if (node.id && node.id.type === 'Identifier' &&
19532+
(node.id.name === 'require' || node.id.name === 'requirejs') &&
19533+
node.init && node.init.type === 'ObjectExpression') {
19534+
return node.init;
19535+
}
19536+
};
19537+
1952019538
/**
1952119539
* Finds all dependencies specified in dependency arrays and inside
1952219540
* simplified commonjs wrappers.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy