Permalink
Browse files

Some display cleanup, but not all modules are showing up.

  • Loading branch information...
jrburke committed Jun 28, 2012
1 parent 3c29f14 commit a2c9bfceb34b5473013b3ffcfa1ca01e20d97db0
Showing with 15 additions and 3 deletions.
  1. +1 −1 tests/case/case.html
  2. +14 −2 xrayquire.js
View
@@ -3,7 +3,7 @@
<head>
<title>Case-insensitive test</title>
<script data-main="main" src="../require.js"></script>
- <script src="../../xrayquire"></script>
+ <script src="../../xrayquire.js"></script>
</head>
<body>
<h1>Case-insensitive test</h1>
View
@@ -59,7 +59,7 @@ var xrayquire;
}
function formatUrl(url) {
- return isRequire(url) ? '' : url;
+ return !url || isRequire(url) ? '' : url;
}
function getX(context) {
@@ -84,6 +84,12 @@ var xrayquire;
function trackModule(mod) {
var id = mod.map.id;
+ //If an intermediate module from a plugin, do not
+ //track it
+ if (mod.map.prefix && id.indexOf('_unnormalized') !== -1) {
+ return;
+ }
+
//Cycle through the dependencies now, wire this up here
//instead of context.load so that we get a recording of
//modules as they are encountered, and not as they
@@ -94,7 +100,7 @@ var xrayquire;
var depId = dep.id,
lowerId = depId.toLowerCase();
- if (mixedCases[lowerId]) {
+ if (mixedCases[lowerId] && depId !== mixedCases[lowerId].id) {
console.error('Mixed case modules may conflict: ' +
formatId(mixedCases[lowerId].refId) +
' asked for: "' +
@@ -205,6 +211,12 @@ var xrayquire;
traced = xray.traced,
html = '';
+ //Sort the traceOrder, but do it by lowercase comparisons,
+ //to keep 'something' and 'Something' next to each other.
+ xray.traceOrder.sort(function (a, b) {
+ return a.toLowerCase() > b.toLowerCase() ? 1 : -1;
+ });
+
//Generate the HTML
each(xray.traceOrder, function (id) {
var mod = traced[id],

0 comments on commit a2c9bfc

Please sign in to comment.