Skip to content

Commit

Permalink
Enforce projectRoot as a config parameter for rrequire
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-mooser committed Apr 1, 2015
1 parent 49f1786 commit a3fa313
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ module.exports = function construct(config) {

config = config || {};
config = _.defaults(config, {
projectRoot: null,
useGlobals: true,
useTestConfig: false,
apiTestServer: null // if you want the api test framework setup with super test and authentication helpers, pass in your server module here.
});

if (!config.projectRoot) throw error('WIN_COMMON', 'You must specify a projectRoot. Try __dirname.');
/** Define rrequire
*
*/
Expand All @@ -37,7 +39,7 @@ module.exports = function construct(config) {
global.rrequire.basePaths = [];
}

global.rrequire.basePaths.push(__dirname);
global.rrequire.basePaths.push(config.projectRoot);


/** Setup Logging
Expand Down

0 comments on commit a3fa313

Please sign in to comment.