Skip to content

Instantly share code, notes, and snippets.

@apaleslimghost
Last active July 1, 2016 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apaleslimghost/d6c0d2ba3e343a6300bff05bfe010b0d to your computer and use it in GitHub Desktop.
Save apaleslimghost/d6c0d2ba3e343a6300bff05bfe010b0d to your computer and use it in GitHub Desktop.
import findParentDir from 'find-parent-dir';
import path from 'path';
module.exports = function(filename, dirname) {
return require(path.resolve(findParentDir.sync(dirname || __dirname, filename), filename));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment