resolve-plugin.js 770 B

123456789101112131415161718192021
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = resolvePlugin;
  4. var _resolveFromPossibleNames = require("./resolve-from-possible-names");
  5. var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
  6. var _getPossiblePluginNames = require("./get-possible-plugin-names");
  7. var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames);
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. function resolvePlugin(pluginName) {
  10. var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
  11. return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname);
  12. }
  13. module.exports = exports["default"];