MCPcopy Create free account
hub / github.com/ReactTooltip/react-tooltip / replaceCssPlaceholders

Function replaceCssPlaceholders

esbuild.config.prod.mjs:119–129  ·  view source on GitHub ↗
(file, cssContent)

Source from the content-addressed store, hash-verified

117await copyFile('src/tokens.css', 'dist/react-tooltip-tokens.css')
118
119const replaceCssPlaceholders = async (file, cssContent) => {
120 const js = await readFile(file, 'utf8')
121 const cssLiteral = JSON.stringify(cssContent)
122 const replacedBase = js
123 .replaceAll('"react-tooltip-css-placeholder"', cssLiteral)
124 .replaceAll("'react-tooltip-css-placeholder'", cssLiteral)
125 const replacedAll = replacedBase
126 .replaceAll('"react-tooltip-core-css-placeholder"', cssLiteral)
127 .replaceAll("'react-tooltip-core-css-placeholder'", cssLiteral)
128 await writeFile(file, replacedAll)
129}
130
131await Promise.all([
132 replaceCssPlaceholders('dist/react-tooltip.mjs', regularCss),

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected