1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.logPlugin = void 0;
|
7 |
|
8 | var _helperCompilationTargets = require("@babel/helper-compilation-targets");
|
9 |
|
10 | const logPlugin = (item, targetVersions, list) => {
|
11 | const filteredList = (0, _helperCompilationTargets.getInclusionReasons)(item, targetVersions, list);
|
12 | const support = list[item];
|
13 |
|
14 | if (!support) {
|
15 | console.log(` ${item}`);
|
16 | return;
|
17 | }
|
18 |
|
19 | let formattedTargets = `{`;
|
20 | let first = true;
|
21 |
|
22 | for (const target of Object.keys(filteredList)) {
|
23 | if (!first) formattedTargets += `,`;
|
24 | first = false;
|
25 | formattedTargets += ` ${target}`;
|
26 | if (support[target]) formattedTargets += ` < ${support[target]}`;
|
27 | }
|
28 |
|
29 | formattedTargets += ` }`;
|
30 | console.log(` ${item} ${formattedTargets}`);
|
31 | };
|
32 |
|
33 | exports.logPlugin = logPlugin; |
\ | No newline at end of file |