main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
909 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
---|
| 2 | import _regeneratorRuntime from "@babel/runtime/regenerator";
|
---|
| 3 | export default (function (name, loader) {
|
---|
| 4 | return /*#__PURE__*/function () {
|
---|
| 5 | var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(registerLanguage) {
|
---|
| 6 | var module;
|
---|
| 7 | return _regeneratorRuntime.wrap(function _callee$(_context) {
|
---|
| 8 | while (1) {
|
---|
| 9 | switch (_context.prev = _context.next) {
|
---|
| 10 | case 0:
|
---|
| 11 | _context.next = 2;
|
---|
| 12 | return loader();
|
---|
| 13 |
|
---|
| 14 | case 2:
|
---|
| 15 | module = _context.sent;
|
---|
| 16 | registerLanguage(name, module["default"] || module);
|
---|
| 17 |
|
---|
| 18 | case 4:
|
---|
| 19 | case "end":
|
---|
| 20 | return _context.stop();
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 | }, _callee);
|
---|
| 24 | }));
|
---|
| 25 |
|
---|
| 26 | return function (_x) {
|
---|
| 27 | return _ref.apply(this, arguments);
|
---|
| 28 | };
|
---|
| 29 | }();
|
---|
| 30 | }); |
---|
Note:
See
TracBrowser
for help on using the repository browser.