index.js
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
"use strict";
exports.__esModule = true;
// istanbul ignore next
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
// istanbul ignore next
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _pipeline = require("./pipeline");
var _pipeline2 = _interopRequireDefault(_pipeline);
/**
* [Please add a description.]
*/
/**
* [Please add a description.]
*/
var _transformers = require("./transformers");
var _transformers2 = _interopRequireDefault(_transformers);
/**
* [Please add a description.]
*/
var _transformersDeprecated = require("./transformers/deprecated");
var _transformersDeprecated2 = _interopRequireDefault(_transformersDeprecated);
/**
* [Please add a description.]
*/
var _transformersAliases = require("./transformers/aliases");
var _transformersAliases2 = _interopRequireDefault(_transformersAliases);
/**
* [Please add a description.]
*/
var _transformersFilters = require("./transformers/filters");
var filters = _interopRequireWildcard(_transformersFilters);
var pipeline = new _pipeline2["default"]();
for (var key in _transformers2["default"]) {
var transformer = _transformers2["default"][key];
if (typeof transformer === "object") {
var metadata = transformer.metadata = transformer.metadata || {};
metadata.group = metadata.group || "builtin-basic";
}
}
pipeline.addTransformers(_transformers2["default"]);
pipeline.addDeprecated(_transformersDeprecated2["default"]);
pipeline.addAliases(_transformersAliases2["default"]);
pipeline.addFilter(filters.internal);
pipeline.addFilter(filters.blacklist);
pipeline.addFilter(filters.whitelist);
pipeline.addFilter(filters.stage);
pipeline.addFilter(filters.optional);
/**
* [Please add a description.]
*/
var transform = pipeline.transform.bind(pipeline);
transform.fromAst = pipeline.transformFromAst.bind(pipeline);
transform.pipeline = pipeline;
exports["default"] = transform;
module.exports = exports["default"];