Skip to content

Commit

Permalink
Restructure nwm-user-sample loading to make it less difficult to load…
Browse files Browse the repository at this point in the history
… the nwm dependencies needed to run
  • Loading branch information
mixu committed Dec 19, 2014
1 parent df2cba6 commit fa03c48
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 232 deletions.
4 changes: 2 additions & 2 deletions bin/nwm
Expand Up @@ -43,12 +43,12 @@ homePath = (typeof homePath === 'string' ? path.normalize(homePath) : process.cw

// try ~/.nwm-user
try {
console.log(require(homePath + '/.nwm-user'));
require(homePath + '/.nwm-user')(require('../index.js'));
return;
} catch (e) {
console.log('Error finding or executing ~/.nwm-user, launching with default nwm-user-sample.js');
console.log('Error was:');
console.log(e);
}

require('../nwm-user-sample.js');
require('../nwm-user-sample.js')(require('../index.js'));
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -2,5 +2,6 @@ module.exports = {
NWM: require('./nwm.js'),
keysymdef: require('./lib/keysymdef.js'),
Xh: require('./lib/x.js'),
layouts: require('./lib/layouts')
layouts: require('./lib/layouts'),
which: require('which')
};

0 comments on commit fa03c48

Please sign in to comment.