Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
825 bytes
|
Line | |
---|
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; |
---|
Note:
See
TracBrowser
for help on using the repository browser.