Skip to content

Commit

Permalink
Replace Paths to the "main application" with the path to "SourceJS" u…
Browse files Browse the repository at this point in the history
…sing global.pathToApp
  • Loading branch information
Alanoll committed Dec 12, 2016
1 parent 6e04656 commit a2de35f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var express = require('express');
var path = require('path');
var ParseData = require(path.join(global.pathToApp, 'core/lib/parseData'));
var utils = require(path.join(global.pathToApp, 'core/lib/utils'));
var pathToApp = path.dirname(require.main.filename);
var pathToApp = global.pathToApp;
var htmlTree = require(path.join(global.pathToApp, 'core/html-tree'));
var unflatten = require(path.join(global.pathToApp,'core/unflat'));

Expand Down
2 changes: 1 addition & 1 deletion core/loadOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var legacyOptionsChecker = function(options, fileName){
module.exports = function(basePath, _silent){
silent = _silent;

var pathToApp = basePath || path.dirname(require.main.filename);
var pathToApp = basePath || global.pathToApp;

var mergedOptions = utils.requireUncached(path.join(pathToApp, 'options'));

Expand Down
2 changes: 1 addition & 1 deletion core/middlewares/clarify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var http = require('http');

var ejs = require(path.join(global.pathToApp, 'core/ejsWithHelpers.js'));
var trackStats = require(path.join(global.pathToApp, 'core/trackStats'));
var pathToApp = path.dirname(require.main.filename);
var pathToApp = global.pathToApp;
var specUtils = require(path.join(pathToApp, 'core/lib/specUtils'));
var ParseData = require(path.join(pathToApp, 'core/lib/parseData'));
var specsParser = require(path.join(pathToApp, 'core/lib/specPageParser'));
Expand Down
2 changes: 1 addition & 1 deletion core/routes/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var path = require('path');
var express = require('express');
var pathToApp = path.dirname(require.main.filename);
var pathToApp = global.pathToApp;

/*
*
Expand Down

0 comments on commit a2de35f

Please sign in to comment.