Skip to content

Commit

Permalink
snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
jrburke committed Feb 13, 2012
1 parent 257b523 commit 175c99a
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions dist/r.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license r.js 1.0.5+ Wed, 01 Feb 2012 01:32:55 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* @license r.js 1.0.5+ Mon, 13 Feb 2012 05:05:17 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
Expand All @@ -20,7 +20,7 @@ var requirejs, require, define;

var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
nodeDefine, exists, reqMain, loadedOptimizedLib,
version = '1.0.5+ Wed, 01 Feb 2012 01:32:55 GMT',
version = '1.0.5+ Mon, 13 Feb 2012 05:05:17 GMT',
jsSuffixRegExp = /\.js$/,
commandOption = '',
useLibLoaded = {},
Expand Down Expand Up @@ -8512,14 +8512,16 @@ define('commonJs', ['env!env/file', 'uglifyjs/index'], function (file, uglify) {
* see: http://github.com/jrburke/requirejs for details
*/

/*jslint regexp: false, plusplus: false, nomen: false, strict: false */
/*global define: false, require: false */
/*jslint plusplus: true, nomen: true */
/*global define, require */


define('build', [ 'lang', 'logger', 'env!env/file', 'parse', 'optimize', 'pragma',
'env!env/load', 'requirePatch'],
function (lang, logger, file, parse, optimize, pragma,
load, requirePatch) {
'use strict';

var build, buildBaseConfig,
endsWithSemiColonRegExp = /;\s*$/;

Expand Down Expand Up @@ -9040,32 +9042,25 @@ function (lang, logger, file, parse, optimize, pragma,
* to the absFilePath passed in.
*/
build.makeAbsConfig = function (config, absFilePath) {
var props, prop, i, originalBaseUrl;
var props, prop, i;

props = ["appDir", "dir", "baseUrl"];
for (i = 0; (prop = props[i]); i++) {
if (config[prop]) {
//Add abspath if necessary, make sure these paths end in
//slashes
if (prop === "baseUrl") {
originalBaseUrl = config.baseUrl;
config.originalBaseUrl = config.baseUrl;
if (config.appDir) {
//If baseUrl with an appDir, the baseUrl is relative to
//the appDir, *not* the absFilePath. appDir and dir are
//made absolute before baseUrl, so this will work.
config.baseUrl = build.makeAbsPath(originalBaseUrl, config.appDir);
//Set up dir output baseUrl.
config.dirBaseUrl = build.makeAbsPath(originalBaseUrl, config.dir);
config.baseUrl = build.makeAbsPath(config.originalBaseUrl, config.appDir);
} else {
//The dir output baseUrl is same as regular baseUrl, both
//relative to the absFilePath.
config.baseUrl = build.makeAbsPath(config[prop], absFilePath);
config.dirBaseUrl = config.dir || config.baseUrl;
}

//Make sure dirBaseUrl ends in a slash, since it is
//concatenated with other strings.
config.dirBaseUrl = endsWithSlash(config.dirBaseUrl);
} else {
config[prop] = build.makeAbsPath(config[prop], absFilePath);
}
Expand Down Expand Up @@ -9138,12 +9133,13 @@ function (lang, logger, file, parse, optimize, pragma,
var config = {}, buildFileContents, buildFileConfig, mainConfig,
mainConfigFile, prop, buildFile, absFilePath;

lang.mixin(config, buildBaseConfig);
lang.mixin(config, cfg, true);

//Make sure all paths are relative to current directory.
absFilePath = file.absPath('.');
build.makeAbsConfig(config, absFilePath);
build.makeAbsConfig(cfg, absFilePath);
build.makeAbsConfig(buildBaseConfig, absFilePath);

lang.mixin(config, buildBaseConfig);
lang.mixin(config, cfg, true);

if (config.buildFile) {
//A build file exists, load it to get more config.
Expand Down Expand Up @@ -9205,6 +9201,19 @@ function (lang, logger, file, parse, optimize, pragma,
//args should take precedence over build file values.
mixConfig(config, cfg);


//Set final output dir
if (config.hasOwnProperty("baseUrl")) {
if (config.appDir) {
config.dirBaseUrl = build.makeAbsPath(config.originalBaseUrl, config.dir);
} else {
config.dirBaseUrl = config.dir || config.baseUrl;
}
//Make sure dirBaseUrl ends in a slash, since it is
//concatenated with other strings.
config.dirBaseUrl = endsWithSlash(config.dirBaseUrl);
}

//Check for errors in config
if (config.cssIn && !config.out) {
throw new Error("ERROR: 'out' option missing.");
Expand Down

0 comments on commit 175c99a

Please sign in to comment.