]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dojo/_base/configNode.js
upgrade dojo to 1.8.3 (refs #570)
[tt-rss.git] / lib / dojo / _base / configNode.js
index 7cd6f14f98fb3af4a264fb0c0bf685fbe1658fde..1866795c1981ac8ae81d8f7f6d14625228d764e1 100644 (file)
@@ -1,5 +1,5 @@
 exports.config = function(config){
-       //      summary:
+       // summary:
        //              This module provides bootstrap configuration for running dojo in node.js
 
        // any command line arguments with the load flag are pushed into deps
@@ -15,7 +15,7 @@ exports.config = function(config){
        var fs = require("fs");
 
        // make sure global require exists
-       //if (typeof global.require=="undefined") {
+       //if (typeof global.require=="undefined"){
        //      global.require= {};
        //}
 
@@ -40,12 +40,12 @@ exports.config = function(config){
                config.hasCache[p] = hasCache[p];
        }
 
-       var vm = require('vm');
-
+       var vm = require('vm'),
+               path = require('path');
 
        // reset some configuration switches with node-appropriate values
        var nodeConfig = {
-               baseUrl: __dirname.match(/(.+)[\/\\]_base$/)[1],
+               baseUrl: path.dirname(process.argv[1]),
                commandLineArgs:args,
                deps:deps,
                timeout:0,