1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 |
|
5 | var _babelPluginTransformEs2015TemplateLiterals = require("babel-plugin-transform-es2015-template-literals");
|
6 |
|
7 | var _babelPluginTransformEs2015TemplateLiterals2 = _interopRequireDefault(_babelPluginTransformEs2015TemplateLiterals);
|
8 |
|
9 | var _babelPluginTransformEs2015Literals = require("babel-plugin-transform-es2015-literals");
|
10 |
|
11 | var _babelPluginTransformEs2015Literals2 = _interopRequireDefault(_babelPluginTransformEs2015Literals);
|
12 |
|
13 | var _babelPluginTransformEs2015FunctionName = require("babel-plugin-transform-es2015-function-name");
|
14 |
|
15 | var _babelPluginTransformEs2015FunctionName2 = _interopRequireDefault(_babelPluginTransformEs2015FunctionName);
|
16 |
|
17 | var _babelPluginTransformEs2015ArrowFunctions = require("babel-plugin-transform-es2015-arrow-functions");
|
18 |
|
19 | var _babelPluginTransformEs2015ArrowFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015ArrowFunctions);
|
20 |
|
21 | var _babelPluginTransformEs2015BlockScopedFunctions = require("babel-plugin-transform-es2015-block-scoped-functions");
|
22 |
|
23 | var _babelPluginTransformEs2015BlockScopedFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScopedFunctions);
|
24 |
|
25 | var _babelPluginTransformEs2015Classes = require("babel-plugin-transform-es2015-classes");
|
26 |
|
27 | var _babelPluginTransformEs2015Classes2 = _interopRequireDefault(_babelPluginTransformEs2015Classes);
|
28 |
|
29 | var _babelPluginTransformEs2015ObjectSuper = require("babel-plugin-transform-es2015-object-super");
|
30 |
|
31 | var _babelPluginTransformEs2015ObjectSuper2 = _interopRequireDefault(_babelPluginTransformEs2015ObjectSuper);
|
32 |
|
33 | var _babelPluginTransformEs2015ShorthandProperties = require("babel-plugin-transform-es2015-shorthand-properties");
|
34 |
|
35 | var _babelPluginTransformEs2015ShorthandProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ShorthandProperties);
|
36 |
|
37 | var _babelPluginTransformEs2015DuplicateKeys = require("babel-plugin-transform-es2015-duplicate-keys");
|
38 |
|
39 | var _babelPluginTransformEs2015DuplicateKeys2 = _interopRequireDefault(_babelPluginTransformEs2015DuplicateKeys);
|
40 |
|
41 | var _babelPluginTransformEs2015ComputedProperties = require("babel-plugin-transform-es2015-computed-properties");
|
42 |
|
43 | var _babelPluginTransformEs2015ComputedProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ComputedProperties);
|
44 |
|
45 | var _babelPluginTransformEs2015ForOf = require("babel-plugin-transform-es2015-for-of");
|
46 |
|
47 | var _babelPluginTransformEs2015ForOf2 = _interopRequireDefault(_babelPluginTransformEs2015ForOf);
|
48 |
|
49 | var _babelPluginTransformEs2015StickyRegex = require("babel-plugin-transform-es2015-sticky-regex");
|
50 |
|
51 | var _babelPluginTransformEs2015StickyRegex2 = _interopRequireDefault(_babelPluginTransformEs2015StickyRegex);
|
52 |
|
53 | var _babelPluginTransformEs2015UnicodeRegex = require("babel-plugin-transform-es2015-unicode-regex");
|
54 |
|
55 | var _babelPluginTransformEs2015UnicodeRegex2 = _interopRequireDefault(_babelPluginTransformEs2015UnicodeRegex);
|
56 |
|
57 | var _babelPluginCheckEs2015Constants = require("babel-plugin-check-es2015-constants");
|
58 |
|
59 | var _babelPluginCheckEs2015Constants2 = _interopRequireDefault(_babelPluginCheckEs2015Constants);
|
60 |
|
61 | var _babelPluginTransformEs2015Spread = require("babel-plugin-transform-es2015-spread");
|
62 |
|
63 | var _babelPluginTransformEs2015Spread2 = _interopRequireDefault(_babelPluginTransformEs2015Spread);
|
64 |
|
65 | var _babelPluginTransformEs2015Parameters = require("babel-plugin-transform-es2015-parameters");
|
66 |
|
67 | var _babelPluginTransformEs2015Parameters2 = _interopRequireDefault(_babelPluginTransformEs2015Parameters);
|
68 |
|
69 | var _babelPluginTransformEs2015Destructuring = require("babel-plugin-transform-es2015-destructuring");
|
70 |
|
71 | var _babelPluginTransformEs2015Destructuring2 = _interopRequireDefault(_babelPluginTransformEs2015Destructuring);
|
72 |
|
73 | var _babelPluginTransformEs2015BlockScoping = require("babel-plugin-transform-es2015-block-scoping");
|
74 |
|
75 | var _babelPluginTransformEs2015BlockScoping2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScoping);
|
76 |
|
77 | var _babelPluginTransformEs2015TypeofSymbol = require("babel-plugin-transform-es2015-typeof-symbol");
|
78 |
|
79 | var _babelPluginTransformEs2015TypeofSymbol2 = _interopRequireDefault(_babelPluginTransformEs2015TypeofSymbol);
|
80 |
|
81 | var _babelPluginTransformEs2015ModulesCommonjs = require("babel-plugin-transform-es2015-modules-commonjs");
|
82 |
|
83 | var _babelPluginTransformEs2015ModulesCommonjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesCommonjs);
|
84 |
|
85 | var _babelPluginTransformEs2015ModulesSystemjs = require("babel-plugin-transform-es2015-modules-systemjs");
|
86 |
|
87 | var _babelPluginTransformEs2015ModulesSystemjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesSystemjs);
|
88 |
|
89 | var _babelPluginTransformEs2015ModulesAmd = require("babel-plugin-transform-es2015-modules-amd");
|
90 |
|
91 | var _babelPluginTransformEs2015ModulesAmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesAmd);
|
92 |
|
93 | var _babelPluginTransformEs2015ModulesUmd = require("babel-plugin-transform-es2015-modules-umd");
|
94 |
|
95 | var _babelPluginTransformEs2015ModulesUmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesUmd);
|
96 |
|
97 | var _babelPluginTransformRegenerator = require("babel-plugin-transform-regenerator");
|
98 |
|
99 | var _babelPluginTransformRegenerator2 = _interopRequireDefault(_babelPluginTransformRegenerator);
|
100 |
|
101 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
102 |
|
103 | function preset(context) {
|
104 | var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
105 |
|
106 | var moduleTypes = ["commonjs", "amd", "umd", "systemjs"];
|
107 | var loose = false;
|
108 | var modules = "commonjs";
|
109 | var spec = false;
|
110 |
|
111 | if (opts !== undefined) {
|
112 | if (opts.loose !== undefined) loose = opts.loose;
|
113 | if (opts.modules !== undefined) modules = opts.modules;
|
114 | if (opts.spec !== undefined) spec = opts.spec;
|
115 | }
|
116 |
|
117 | if (typeof loose !== "boolean") throw new Error("Preset es2015 'loose' option must be a boolean.");
|
118 | if (typeof spec !== "boolean") throw new Error("Preset es2015 'spec' option must be a boolean.");
|
119 | if (modules !== false && moduleTypes.indexOf(modules) === -1) {
|
120 | throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\n" + "or a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'");
|
121 | }
|
122 |
|
123 | var optsLoose = { loose: loose };
|
124 |
|
125 | return {
|
126 | plugins: [[_babelPluginTransformEs2015TemplateLiterals2.default, { loose: loose, spec: spec }], _babelPluginTransformEs2015Literals2.default, _babelPluginTransformEs2015FunctionName2.default, [_babelPluginTransformEs2015ArrowFunctions2.default, { spec: spec }], _babelPluginTransformEs2015BlockScopedFunctions2.default, [_babelPluginTransformEs2015Classes2.default, optsLoose], _babelPluginTransformEs2015ObjectSuper2.default, _babelPluginTransformEs2015ShorthandProperties2.default, _babelPluginTransformEs2015DuplicateKeys2.default, [_babelPluginTransformEs2015ComputedProperties2.default, optsLoose], [_babelPluginTransformEs2015ForOf2.default, optsLoose], _babelPluginTransformEs2015StickyRegex2.default, _babelPluginTransformEs2015UnicodeRegex2.default, _babelPluginCheckEs2015Constants2.default, [_babelPluginTransformEs2015Spread2.default, optsLoose], _babelPluginTransformEs2015Parameters2.default, [_babelPluginTransformEs2015Destructuring2.default, optsLoose], _babelPluginTransformEs2015BlockScoping2.default, _babelPluginTransformEs2015TypeofSymbol2.default, modules === "commonjs" && [_babelPluginTransformEs2015ModulesCommonjs2.default, optsLoose], modules === "systemjs" && [_babelPluginTransformEs2015ModulesSystemjs2.default, optsLoose], modules === "amd" && [_babelPluginTransformEs2015ModulesAmd2.default, optsLoose], modules === "umd" && [_babelPluginTransformEs2015ModulesUmd2.default, optsLoose], [_babelPluginTransformRegenerator2.default, { async: false, asyncGenerators: false }]].filter(Boolean) };
|
127 | }
|
128 |
|
129 | var oldConfig = preset({});
|
130 |
|
131 | exports.default = oldConfig;
|
132 |
|
133 | Object.defineProperty(oldConfig, "buildPreset", {
|
134 | configurable: true,
|
135 | writable: true,
|
136 |
|
137 | enumerable: false,
|
138 | value: preset
|
139 | });
|
140 | module.exports = exports["default"]; |
\ | No newline at end of file |