@builder.io/mitosis 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,4 +7,5 @@ export interface ToVueOptions extends BaseTranspilerOptions {
7
7
  defineComponent?: boolean;
8
8
  api: Api;
9
9
  convertClassStringToObject?: boolean;
10
+ casing?: 'pascal' | 'kebab';
10
11
  }
@@ -97,6 +97,7 @@ var onUpdatePlugin = function (options) { return ({
97
97
  var BASE_OPTIONS = {
98
98
  api: 'options',
99
99
  defineComponent: true,
100
+ casing: 'pascal',
100
101
  };
101
102
  var componentToVue = function (userOptions) {
102
103
  return function (_a) {
@@ -181,7 +182,12 @@ var componentToVue = function (userOptions) {
181
182
  prefix: (_d = (_c = options.cssNamespace) === null || _c === void 0 ? void 0 : _c.call(options)) !== null && _d !== void 0 ? _d : undefined,
182
183
  });
183
184
  (0, strip_meta_properties_1.stripMetaProperties)(component);
184
- var template = (0, function_1.pipe)(component.children.map(function (item) { return (0, blocks_1.blockToVue)(item, options, { isRootNode: true }); }).join('\n'), helpers_1.renameMitosisComponentsToKebabCase);
185
+ var templateStrBody = component.children
186
+ .map(function (item) { return (0, blocks_1.blockToVue)(item, options, { isRootNode: true }); })
187
+ .join('\n');
188
+ var template = options.casing === 'kebab'
189
+ ? (0, helpers_1.renameMitosisComponentsToKebabCase)(templateStrBody)
190
+ : templateStrBody;
185
191
  var onUpdateWithDeps = ((_e = component.hooks.onUpdate) === null || _e === void 0 ? void 0 : _e.filter(function (hook) { var _a; return (_a = hook.deps) === null || _a === void 0 ? void 0 : _a.length; })) || [];
186
192
  var onUpdateWithoutDeps = ((_f = component.hooks.onUpdate) === null || _f === void 0 ? void 0 : _f.filter(function (hook) { var _a; return !((_a = hook.deps) === null || _a === void 0 ? void 0 : _a.length); })) || [];
187
193
  var getterKeys = Object.keys((0, lodash_1.pickBy)(component.state, function (i) { return (i === null || i === void 0 ? void 0 : i.type) === 'getter'; }));
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "name": "Builder.io",
23
23
  "url": "https://www.builder.io"
24
24
  },
25
- "version": "0.2.7",
25
+ "version": "0.2.8",
26
26
  "homepage": "https://github.com/BuilderIO/mitosis",
27
27
  "main": "./dist/src/index.js",
28
28
  "exports": {