bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
58 lines (41 loc) • 1.22 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _bluebird() {
const data = require("bluebird");
_bluebird = function () {
return data;
};
return data;
}
function _scope() {
const data = require("../../../scope");
_scope = function () {
return data;
};
return data;
}
function _scopeComponentsImporter() {
const data = _interopRequireDefault(require("../../../scope/component-ops/scope-components-importer"));
_scopeComponentsImporter = function () {
return data;
};
return data;
}
var _default = /*#__PURE__*/function () {
var _list = (0, _bluebird().coroutine)(function* (path, id) {
const scope = yield (0, _scope().loadScope)(path);
const bitId = yield scope.getParsedId(id);
const scopeComponentsImporter = _scopeComponentsImporter().default.getInstance(scope);
const component = yield scopeComponentsImporter.loadComponent(bitId);
return component.toString();
});
function list(_x, _x2) {
return _list.apply(this, arguments);
}
return list;
}();
exports.default = _default;
;