Skip to content

Commit 862769e

Browse files
committed
snapshot update
1 parent 0889064 commit 862769e

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

dist/r.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.0.2+ Mon, 18 Jun 2012 17:33:16 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.0.2+ Mon, 18 Jun 2012 20:53:28 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.2+ Mon, 18 Jun 2012 17:33:16 GMT',
23+
version = '2.0.2+ Mon, 18 Jun 2012 20:53:28 GMT',
2424
jsSuffixRegExp = /\.js$/,
2525
commandOption = '',
2626
useLibLoaded = {},
@@ -2021,21 +2021,21 @@ var requirejs, require, define;
20212021
//baseUrl, if it is not already set.
20222022
dataMain = script.getAttribute('data-main');
20232023
if (dataMain) {
2024-
2025-
//Pull off the directory of data-main for use as the
2026-
//baseUrl.
2027-
src = dataMain.split('/');
2028-
mainScript = src.pop();
2029-
subPath = src.length ? src.join('/') + '/' : './';
2030-
20312024
//Set final baseUrl if there is not already an explicit one.
20322025
if (!cfg.baseUrl) {
2026+
//Pull off the directory of data-main for use as the
2027+
//baseUrl.
2028+
src = dataMain.split('/');
2029+
mainScript = src.pop();
2030+
subPath = src.length ? src.join('/') + '/' : './';
2031+
20332032
cfg.baseUrl = subPath;
2033+
dataMain = mainScript;
20342034
}
20352035

20362036
//Strip off any trailing .js since dataMain is now
20372037
//like a module name.
2038-
dataMain = mainScript.replace(jsSuffixRegExp, '');
2038+
dataMain = dataMain.replace(jsSuffixRegExp, '');
20392039

20402040
//Put the data-main script in the files to load.
20412041
cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];
@@ -3135,12 +3135,14 @@ if(env === 'node') {
31353135
* see: http://github.com/jrburke/requirejs for details
31363136
*/
31373137

3138-
/*jslint strict: false */
3139-
/*global define: false, console: false */
3138+
/*jslint */
3139+
/*global define, process */
31403140

3141-
define('node/print', function () {
3141+
define('node/print', ['fs'], function (fs) {
3142+
'use strict';
31423143
function print(msg) {
3143-
console.log(msg);
3144+
fs.writeSync(process.stdout.fd, msg + '\n');
3145+
fs.fsyncSync(process.stdout.fd);
31443146
}
31453147

31463148
return print;

require.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,21 +1915,21 @@ var requirejs, require, define;
19151915
//baseUrl, if it is not already set.
19161916
dataMain = script.getAttribute('data-main');
19171917
if (dataMain) {
1918-
1919-
//Pull off the directory of data-main for use as the
1920-
//baseUrl.
1921-
src = dataMain.split('/');
1922-
mainScript = src.pop();
1923-
subPath = src.length ? src.join('/') + '/' : './';
1924-
19251918
//Set final baseUrl if there is not already an explicit one.
19261919
if (!cfg.baseUrl) {
1920+
//Pull off the directory of data-main for use as the
1921+
//baseUrl.
1922+
src = dataMain.split('/');
1923+
mainScript = src.pop();
1924+
subPath = src.length ? src.join('/') + '/' : './';
1925+
19271926
cfg.baseUrl = subPath;
1927+
dataMain = mainScript;
19281928
}
19291929

19301930
//Strip off any trailing .js since dataMain is now
19311931
//like a module name.
1932-
dataMain = mainScript.replace(jsSuffixRegExp, '');
1932+
dataMain = dataMain.replace(jsSuffixRegExp, '');
19331933

19341934
//Put the data-main script in the files to load.
19351935
cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];

0 commit comments

Comments
 (0)