source: imaps-frontend/node_modules/@babel/preset-react/lib/index.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 2.4 KB
Line 
1'use strict';
2
3Object.defineProperty(exports, '__esModule', { value: true });
4
5var helperPluginUtils = require('@babel/helper-plugin-utils');
6var transformReactJSX = require('@babel/plugin-transform-react-jsx');
7var transformReactJSXDevelopment = require('@babel/plugin-transform-react-jsx-development');
8var transformReactDisplayName = require('@babel/plugin-transform-react-display-name');
9var transformReactPure = require('@babel/plugin-transform-react-pure-annotations');
10var helperValidatorOption = require('@babel/helper-validator-option');
11
12function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
14var transformReactJSX__default = /*#__PURE__*/_interopDefault(transformReactJSX);
15var transformReactJSXDevelopment__default = /*#__PURE__*/_interopDefault(transformReactJSXDevelopment);
16var transformReactDisplayName__default = /*#__PURE__*/_interopDefault(transformReactDisplayName);
17var transformReactPure__default = /*#__PURE__*/_interopDefault(transformReactPure);
18
19new helperValidatorOption.OptionValidator("@babel/preset-react");
20function normalizeOptions(options = {}) {
21 {
22 let {
23 pragma,
24 pragmaFrag
25 } = options;
26 const {
27 pure,
28 throwIfNamespace = true,
29 runtime = "classic",
30 importSource,
31 useBuiltIns,
32 useSpread
33 } = options;
34 if (runtime === "classic") {
35 pragma = pragma || "React.createElement";
36 pragmaFrag = pragmaFrag || "React.Fragment";
37 }
38 const development = options.development == null ? undefined : !!options.development;
39 return {
40 development,
41 importSource,
42 pragma,
43 pragmaFrag,
44 pure,
45 runtime,
46 throwIfNamespace,
47 useBuiltIns,
48 useSpread
49 };
50 }
51}
52
53var index = helperPluginUtils.declarePreset((api, opts) => {
54 api.assertVersion(7);
55 const {
56 development = false,
57 importSource,
58 pragma,
59 pragmaFrag,
60 pure,
61 runtime,
62 throwIfNamespace
63 } = normalizeOptions(opts);
64 return {
65 plugins: [[development ? transformReactJSXDevelopment__default.default : transformReactJSX__default.default, {
66 importSource,
67 pragma,
68 pragmaFrag,
69 runtime,
70 throwIfNamespace,
71 pure,
72 useBuiltIns: !!opts.useBuiltIns,
73 useSpread: opts.useSpread
74 }], transformReactDisplayName__default.default, pure !== false && transformReactPure__default.default].filter(Boolean)
75 };
76});
77
78exports.default = index;
79//# sourceMappingURL=index.js.map
Note: See TracBrowser for help on using the repository browser.