BVB Source Codes

reactide Show resolve.js Source code

Return Download reactide: download resolve.js Source code - Download reactide Source code - Type:.js
  1. "use strict";
  2.  
  3. exports.__esModule = true;
  4.  
  5. var _typeof2 = require("babel-runtime/helpers/typeof");
  6.  
  7. var _typeof3 = _interopRequireDefault(_typeof2);
  8.  
  9. exports.default = function (loc) {
  10.   var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
  11.  
  12.   if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null;
  13.  
  14.   var relativeMod = relativeModules[relative];
  15.  
  16.   if (!relativeMod) {
  17.     relativeMod = new _module2.default();
  18.  
  19.     var filename = _path2.default.join(relative, ".babelrc");
  20.     relativeMod.id = filename;
  21.     relativeMod.filename = filename;
  22.  
  23.     relativeMod.paths = _module2.default._nodeModulePaths(relative);
  24.     relativeModules[relative] = relativeMod;
  25.   }
  26.  
  27.   try {
  28.     return _module2.default._resolveFilename(loc, relativeMod);
  29.   } catch (err) {
  30.     return null;
  31.   }
  32. };
  33.  
  34. var _module = require("module");
  35.  
  36. var _module2 = _interopRequireDefault(_module);
  37.  
  38. var _path = require("path");
  39.  
  40. var _path2 = _interopRequireDefault(_path);
  41.  
  42. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  43.  
  44. var relativeModules = {};
  45.  
  46. module.exports = exports["default"];
downloadresolve.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top