1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = _default;
|
7 | var _pluginSyntaxJsx = _interopRequireDefault(require("@babel/plugin-syntax-jsx"));
|
8 | var _pure = _interopRequireDefault(require("./visitors/pure"));
|
9 | var _minify = _interopRequireDefault(require("./visitors/minify"));
|
10 | var _displayNameAndId = _interopRequireDefault(require("./visitors/displayNameAndId"));
|
11 | var _templateLiterals = _interopRequireDefault(require("./visitors/templateLiterals"));
|
12 | var _assignStyledRequired = _interopRequireDefault(require("./visitors/assignStyledRequired"));
|
13 | var _transpileCssProp = _interopRequireDefault(require("./visitors/transpileCssProp"));
|
14 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15 | function _default({
|
16 | types: t
|
17 | }) {
|
18 | return {
|
19 | inherits: _pluginSyntaxJsx.default,
|
20 | visitor: {
|
21 | Program(path, state) {
|
22 | path.traverse({
|
23 | JSXAttribute(path, state) {
|
24 | (0, _transpileCssProp.default)(t)(path, state);
|
25 | },
|
26 | VariableDeclarator(path, state) {
|
27 | (0, _assignStyledRequired.default)(t)(path, state);
|
28 | }
|
29 | }, state);
|
30 | },
|
31 | CallExpression(path, state) {
|
32 | (0, _displayNameAndId.default)(t)(path, state);
|
33 | (0, _pure.default)(t)(path, state);
|
34 | },
|
35 | TaggedTemplateExpression(path, state) {
|
36 | (0, _minify.default)(t)(path, state);
|
37 | (0, _displayNameAndId.default)(t)(path, state);
|
38 | (0, _templateLiterals.default)(t)(path, state);
|
39 | (0, _pure.default)(t)(path, state);
|
40 | }
|
41 | }
|
42 | };
|
43 | } |
\ | No newline at end of file |