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
optimacms-0.4.2 spec/dummy/node_modules/babel-register/node_modules/babel-core/lib/helpers/resolve.js
optimacms-0.4.2 spec/dummy/node_modules/babel-core/lib/helpers/resolve.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/babel-core/lib/helpers/resolve.js
lux_assets-0.2.11 ./node_modules/babel-core/lib/helpers/resolve.js
lux_assets-0.2.9 ./node_modules/babel-core/lib/helpers/resolve.js
lux_assets-0.2.4 ./node_modules/babel-core/lib/helpers/resolve.js
lux_assets-0.2.2 ./node_modules/babel-core/lib/helpers/resolve.js
lux_assets-0.2.1 ./node_modules/babel-core/lib/helpers/resolve.js
locomotivecms-3.4.0 app/javascript/node_modules/babel-core/lib/helpers/resolve.js
cortex-0.1.3 spec/dummy/node_modules/babel-core/lib/helpers/resolve.js
dragonfly_puppeteer-0.1.0 node_modules/babel-core/lib/helpers/resolve.js
affiliator-0.2.1 node_modules/babel-core/lib/helpers/resolve.js
lanes-0.8.0 node_modules/babel-core/lib/helpers/resolve.js