Skip to content

Commit d26f3ef

Browse files
committed
snapshot
1 parent 7cded15 commit d26f3ef

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

dist/r.js

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.0.0+ Thu, 31 May 2012 01:23:03 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.0.0+ Fri, 01 Jun 2012 06:39:06 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
*/
@@ -20,7 +20,7 @@ var requirejs, require, define;
2020

2121
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
2222
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode,
23-
version = '2.0.0+ Thu, 31 May 2012 01:23:03 GMT',
23+
version = '2.0.0+ Fri, 01 Jun 2012 06:39:06 GMT',
2424
jsSuffixRegExp = /\.js$/,
2525
commandOption = '',
2626
useLibLoaded = {},
@@ -15388,7 +15388,7 @@ function (lang, logger, file, parse, optimize, pragma,
1538815388
build = function (args) {
1538915389
var stackRegExp = /( {4}at[^\n]+)\n/,
1539015390
standardIndent = ' ',
15391-
buildFile, cmdConfig, errorMsg, stackMatch, errorTree,
15391+
buildFile, cmdConfig, errorMsg, errorStack, stackMatch, errorTree,
1539215392
i, j, errorMod;
1539315393

1539415394
try {
@@ -15421,14 +15421,13 @@ function (lang, logger, file, parse, optimize, pragma,
1542115421
stackMatch = stackRegExp.exec(errorMsg);
1542215422

1542315423
if (stackMatch) {
15424-
errorMsg = errorMsg.substring(0, stackMatch.index + stackMatch[0].length + 1);
15424+
errorMsg += errorMsg.substring(0, stackMatch.index + stackMatch[0].length + 1);
1542515425
}
15426-
logger.error(errorMsg);
1542715426

1542815427
//If a module tree that shows what module triggered the error,
1542915428
//print it out.
1543015429
if (errorTree && errorTree.length > 0) {
15431-
errorMsg = 'In module tree:\n';
15430+
errorMsg += '\nIn module tree:\n';
1543215431

1543315432
for (i = errorTree.length - 1; i > -1; i--) {
1543415433
errorMod = errorTree[i];
@@ -15443,21 +15442,26 @@ function (lang, logger, file, parse, optimize, pragma,
1544315442
logger.error(errorMsg);
1544415443
}
1544515444

15446-
errorMsg = e.stack;
15445+
errorStack = e.stack;
1544715446

1544815447
if (typeof args === 'string' && args.indexOf('stacktrace=true') !== -1) {
15449-
logger.error(errorMsg);
15448+
errorMsg += '\n' + errorStack;
1545015449
} else {
15451-
if (!stackMatch && errorMsg) {
15450+
if (!stackMatch && errorStack) {
1545215451
//Just trim out the first "at" in the stack.
15453-
stackMatch = stackRegExp.exec(errorMsg);
15452+
stackMatch = stackRegExp.exec(errorStack);
1545415453
if (stackMatch) {
15455-
logger.error(stackMatch[0] || '');
15454+
errorMsg += '\n' + stackMatch[0] || '';
1545615455
}
1545715456
}
1545815457
}
1545915458

15460-
quit(1);
15459+
if (logger.level > logger.ERROR) {
15460+
throw new Error(errorMsg);
15461+
} else {
15462+
logger.error(errorMsg);
15463+
quit(1);
15464+
}
1546115465
}
1546215466
};
1546315467

@@ -16143,6 +16147,11 @@ function (lang, logger, file, parse, optimize, pragma,
1614316147
' or baseUrl directories optimized.');
1614416148
}
1614516149

16150+
if (config.insertRequire && !lang.isArray(config.insertRequire)) {
16151+
throw new Error('insertRequire should be a list of module IDs' +
16152+
' to insert in to a require([]) call.');
16153+
}
16154+
1614616155
if ((config.name || config.include) && !config.modules) {
1614716156
//Just need to build one file, but may be part of a whole appDir/
1614816157
//baseUrl copy, but specified on the command line, so cannot do

0 commit comments

Comments
 (0)