MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / tailwindMain

Function tailwindMain

packages/backend/src/tailwind/tailwindMain.ts:20–35  ·  view source on GitHub ↗
(
  sceneNode: Array<SceneNode>,
  settings: PluginSettings,
)

Source from the content-addressed store, hash-verified

18const SELF_CLOSING_TAGS = ["img"];
19
20export const tailwindMain = async (
21 sceneNode: Array<SceneNode>,
22 settings: PluginSettings,
23): Promise<string> => {
24 localTailwindSettings = settings;
25 previousExecutionCache = [];
26
27 let result = await tailwindWidgetGenerator(sceneNode, settings);
28
29 // Remove the initial newline that is made in Container
30 if (result.startsWith("\n")) {
31 result = result.slice(1);
32 }
33
34 return result;
35};
36
37const tailwindWidgetGenerator = async (
38 sceneNode: ReadonlyArray<SceneNode>,

Callers 2

convertToCodeFunction · 0.90
codegenModeFunction · 0.90

Calls 1

tailwindWidgetGeneratorFunction · 0.85

Tested by

no test coverage detected