app-module-path-node
app-module-path-node copied to clipboard
Implement option to choose v1.X or v2.X behaviour
Because of reasons i often prefer to unshift the module path array, rather than push onto as is the default behaviour since v2.
Perhaps one could pass an options, ie
require('app-module-path').addPath(p.join(PWD, 'node_modules', { method: 'unshift'; }));
or implement two seperate functions, ie
require('app-module-path').pushPath(p.join(PWD, 'node_modules'));
require('app-module-path').unshiftPath(p.join(PWD, 'node_modules'));