Permalink
Browse files

Adds 'exceptions' to the framework folder structure

  • Loading branch information...
ColinEberhardt committed Jan 24, 2014
1 parent bb18bec commit 1eeb05515fe0600cf864371fb26ae611bc476db3
Showing with 12 additions and 2 deletions.
  1. +12 −2 browser-tests/allTests.js
View
@@ -8,15 +8,25 @@ var testSuite = require('./test.js'),
var list = fs.readdirSync("../architecture-examples/")
.map(function(folderName) { return { name : folderName, path : "architecture-examples/" + folderName} });
-/*list = list.concat(fs.readdirSync("../labs/architecture-examples/")
+list = list.concat(fs.readdirSync("../labs/architecture-examples/")
.map(function(folderName) { return { name : folderName, path: "labs/architecture-examples/" + folderName} }));
list = list.concat(fs.readdirSync("../labs/dependency-examples/")
.map(function(folderName) { return { name : folderName, path: "labs/dependency-examples/" + folderName} }));
list = list.concat(fs.readdirSync("../dependency-examples/")
- .map(function(folderName) { return { name : folderName, path: "dependency-examples/" + folderName} }));*/
+ .map(function(folderName) { return { name : folderName, path: "dependency-examples/" + folderName} }));
+
+// apps that are not hosted at the root of their folder
+var exceptions = [
+ { name : "chaplin-brunch", path : "labs/dependency-examples/chaplin-brunch/public" }
+];
+list = list.map(function(framework) {
+ var exception = exceptions.filter(function(exFramework) { return exFramework.name === framework.name});
+ return exception.length > 0 ? exception[0] : framework;
+});
+console.log(list);
// filter out any folders that are not frameworks (.e.g hidden files)
list = list.filter(function(framework) { return frameworkNamePattern.test(framework.name); });

0 comments on commit 1eeb055

Please sign in to comment.