MCPcopy Create free account
hub / github.com/DarkInventor/easy-ui / extractTailwindConfig

Function extractTailwindConfig

scripts/build.ts:300–311  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

298}
299
300function extractTailwindConfig(content: string): Schema['tailwind'] {
301 const tailwindConfigRegex = /\/\/ @tailwindConfig: (\{.*\})/;
302 const match = content.match(tailwindConfigRegex);
303 if (match) {
304 try {
305 return JSON.parse(match[1]);
306 } catch (error) {
307 console.warn(`Failed to parse Tailwind config for component: ${error}`);
308 }
309 }
310 return {};
311}
312
313async function main() {
314 const easyuiDirectory = path.join(process.cwd(), "components/easyui");

Callers 1

readComponentFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected