Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
593 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports.default = void 0;
|
---|
5 |
|
---|
6 | var _utils = require("../utils");
|
---|
7 |
|
---|
8 | var _default = callProvider => ({
|
---|
9 | ImportDeclaration(path) {
|
---|
10 | const source = (0, _utils.getImportSource)(path);
|
---|
11 | if (!source) return;
|
---|
12 | callProvider({
|
---|
13 | kind: "import",
|
---|
14 | source
|
---|
15 | }, path);
|
---|
16 | },
|
---|
17 |
|
---|
18 | Program(path) {
|
---|
19 | path.get("body").forEach(bodyPath => {
|
---|
20 | const source = (0, _utils.getRequireSource)(bodyPath);
|
---|
21 | if (!source) return;
|
---|
22 | callProvider({
|
---|
23 | kind: "import",
|
---|
24 | source
|
---|
25 | }, bodyPath);
|
---|
26 | });
|
---|
27 | }
|
---|
28 |
|
---|
29 | });
|
---|
30 |
|
---|
31 | exports.default = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.