kopia lustrzana https://github.com/c9/core
use correct version of acorn in treehugger
rodzic
0f23b016db
commit
8d8cf3b3cb
|
@ -2,19 +2,25 @@ var modules = require("module");
|
|||
var oldResolve = modules._resolveFilename;
|
||||
var extraPaths = [
|
||||
__dirname + "/../node_modules/ace/lib",
|
||||
__dirname + "/../node_modules/treehugger/lib",
|
||||
__dirname + "/../node_modules/v8debug/lib",
|
||||
__dirname + "/../"
|
||||
];
|
||||
modules._resolveFilename = function(request, paths) {
|
||||
var extraPathOverrides = [
|
||||
__dirname + "/../node_modules/treehugger/lib",
|
||||
];
|
||||
modules._resolveFilename = function(request, parent) {
|
||||
// Ensure client extensions can be loaded
|
||||
request = request.replace(/^ext\//, "ext.")
|
||||
.replace(/^core\//, "cloud9.core/www/core/")
|
||||
.replace(/^lib\/chai\//, "chai/");
|
||||
// Add the extra paths
|
||||
extraPaths.forEach(function(p) {
|
||||
if(paths.paths.indexOf(p) === -1)
|
||||
paths.paths.push(p);
|
||||
if (parent.paths.indexOf(p) === -1)
|
||||
parent.paths.push(p);
|
||||
});
|
||||
return oldResolve(request, paths);
|
||||
extraPathOverrides.forEach(function(p) {
|
||||
if (parent.paths.indexOf(p) === -1)
|
||||
parent.paths.unshift(p);
|
||||
});
|
||||
return oldResolve(request, parent);
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue