INNER CODE UNIT · TypeScript
total
onejs/one · packages/compiler/src/index.ts:98
const total = compilerLog.compiled + compilerLog.cached
const detail = compilerLog.compiled
? `${compilerLog.compiled} compiled in ${compilerLog.time}ms${compilerLog.cached ? `, ${compilerLog.cached} cached` : ''}`
: `all cached`
console.info(` 🪄 [compiler] ${total} file${total === 1 ? '' : 's'} (${detail})`)
compilerLog.compiled = 0
compilerLog.cached = 0
compilerLog.time = 0
compilerLog.timer = null
}, 500)
compilerLog.timer.unref?.()
}
// Shared Babel transform logic
async function performBabelTransform({
id,
code,
projectRoot,