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

Function runPreJsonPlugins

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

Source from the content-addressed store, hash-verified

4export type { MitosisPlugin };
5
6export const runPreJsonPlugins = ({
7 json,
8 plugins,
9 options,
10}: {
11 json: MitosisComponent;
12 plugins: MitosisPlugin[];
13 options?: any;
14}) => {
15 let useJson = json;
16 for (const plugin of plugins) {
17 const preFunction = plugin(options).json?.pre;
18 if (preFunction) {
19 useJson = preFunction(json) || json;
20 }
21 }
22 return useJson;
23};
24
25export const runPostJsonPlugins = ({
26 json,

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