Sha256: bda3a1d7a3c7ee549f8abb0e1bd56a2c2353b830fefad1cbd20442ae576ab8c6

Contents?: true

Size: 1.19 KB

Versions: 33

Compression:

Stored size: 1.19 KB

Contents

"use strict";

exports.__esModule = true;

var _typeof2 = require("babel-runtime/helpers/typeof");

var _typeof3 = _interopRequireDefault(_typeof2);

exports.default = function (loc) {
  var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();

  if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null;

  var relativeMod = relativeModules[relative];

  if (!relativeMod) {
    relativeMod = new _module2.default();

    var filename = _path2.default.join(relative, ".babelrc");
    relativeMod.id = filename;
    relativeMod.filename = filename;

    relativeMod.paths = _module2.default._nodeModulePaths(relative);
    relativeModules[relative] = relativeMod;
  }

  try {
    return _module2.default._resolveFilename(loc, relativeMod);
  } catch (err) {
    return null;
  }
};

var _module = require("module");

var _module2 = _interopRequireDefault(_module);

var _path = require("path");

var _path2 = _interopRequireDefault(_path);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var relativeModules = {};

module.exports = exports["default"];

Version data entries

33 entries across 29 versions & 9 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.51 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.50 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.49 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.48 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.47 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.46 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.45 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.44 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.43 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.42 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.41 node_modules/babel-core/lib/helpers/resolve.js
immosquare-cleaner-0.1.40 node_modules/babel-core/lib/helpers/resolve.js
ilog-0.4.1 node_modules/babel-core/lib/helpers/resolve.js
ilog-0.4.0 node_modules/babel-core/lib/helpers/resolve.js
ilog-0.3.3 node_modules/babel-core/lib/helpers/resolve.js
optimacms-0.4.3 spec/dummy/node_modules/babel-core/lib/helpers/resolve.js
optimacms-0.4.3 spec/dummy/node_modules/babel-register/node_modules/babel-core/lib/helpers/resolve.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/babel-core/lib/helpers/resolve.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/babel-core/lib/helpers/resolve.js