MCPcopy
hub / github.com/BuilderIO/mitosis / runPostJsonPlugins

Function runPostJsonPlugins

packages/core/src/modules/plugins.ts:25–42  ·  view source on GitHub ↗
({
  json,
  plugins,
  options,
}: {
  json: MitosisComponent;
  plugins: MitosisPlugin[];
  options?: any;
})

Source from the content-addressed store, hash-verified

23};
24
25export const runPostJsonPlugins = ({
26 json,
27 plugins,
28 options,
29}: {
30 json: MitosisComponent;
31 plugins: MitosisPlugin[];
32 options?: any;
33}) => {
34 let useJson = json;
35 for (const plugin of plugins) {
36 const postFunction = plugin(options).json?.post;
37 if (postFunction) {
38 useJson = postFunction(json) || json;
39 }
40 }
41 return useJson;
42};
43
44export const runPreCodePlugins = ({
45 code,

Callers 15

componentToMitosisFunction · 0.90
_componentToReactFunction · 0.90
componentToAlpineFunction · 0.90
componentToQwikFunction · 0.90
componentToMarkoFunction · 0.90
componentToSolidFunction · 0.90
componentToHtmlFunction · 0.90
componentToCustomElementFunction · 0.90
componentToStencilFunction · 0.90
componentToTemplateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected