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

Function runPostCodePlugins

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

Source from the content-addressed store, hash-verified

63};
64
65export const runPostCodePlugins = ({
66 code,
67 plugins,
68 options,
69 json,
70}: {
71 json: MitosisComponent;
72 code: string;
73 plugins: MitosisPlugin[];
74 options?: any;
75}) => {
76 let string = code;
77 for (const plugin of plugins) {
78 const postFunction = plugin(options).code?.post;
79 if (postFunction) {
80 string = postFunction(string, json);
81 }
82 }
83 return string;
84};

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