MCPcopy
hub / github.com/tailwindlabs/tailwindcss / rebuild

Function rebuild

packages/@tailwindcss-browser/src/index.ts:208–230  ·  view source on GitHub ↗
(kind: 'full' | 'incremental')

Source from the content-addressed store, hash-verified

206}
207
208function rebuild(kind: 'full' | 'incremental') {
209 async function run() {
210 if (!compiler && kind !== 'full') {
211 return
212 }
213
214 let buildId = nextBuildId++
215
216 I.start(`Build #${buildId} (${kind})`)
217
218 if (kind === 'full') {
219 await createCompiler()
220 }
221
222 I.start(`Build`)
223 await build(kind)
224 I.end(`Build`)
225
226 I.end(`Build #${buildId} (${kind})`)
227 }
228
229 buildQueue = buildQueue.then(run).catch((err) => I.error(err))
230}
231
232// Handle changes to known stylesheets
233let styleObserver = new MutationObserver(() => rebuild('full'))

Callers 1

index.tsFile · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected