MCPcopy
hub / github.com/sonofmagic/weapp-tailwindcss / parseSourceFileParam

Function parseSourceFileParam

packages/postcss/src/source-scan.ts:257–276  ·  view source on GitHub ↗
(params: string)

Source from the content-addressed store, hash-verified

255}
256
257export function parseSourceFileParam(params: string) {
258 const value = params.trim()
259 if (!value || value === 'none' || value.startsWith('inline(')) {
260 return undefined
261 }
262
263 const negated = value.startsWith('not ')
264 const sourceValue = negated ? value.slice(4).trim() : value
265 if (sourceValue.startsWith('inline(')) {
266 return undefined
267 }
268
269 const match = /^(['"])(.+)\1$/.exec(sourceValue)
270 return match?.[2]
271 ? {
272 negated,
273 sourcePath: match[2],
274 }
275 : undefined
276}
277
278export async function resolveCssSourceEntries(
279 root: Root,

Callers 3

resolveCssSourceEntriesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected