index.ts — tailwindcss Source File
Architecture documentation for index.ts, a typescript file in the tailwindcss codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d3ff87a1_ef49_dab7_2e4d_39270282fbd2["index.ts"] d77bc6d2_1669_1cc6_a56e_77a048f9cd4c["assets.ts"] d3ff87a1_ef49_dab7_2e4d_39270282fbd2 --> d77bc6d2_1669_1cc6_a56e_77a048f9cd4c afa6fc55_69fa_18e5_688a_b47fdb1a1c3e["instrumentation.ts"] d3ff87a1_ef49_dab7_2e4d_39270282fbd2 --> afa6fc55_69fa_18e5_688a_b47fdb1a1c3e 64a99f5c_2d23_77a2_ec09_70c5f3a753fc["Instrumentation"] d3ff87a1_ef49_dab7_2e4d_39270282fbd2 --> 64a99f5c_2d23_77a2_ec09_70c5f3a753fc a8dc9eb6_c1a4_11e4_fc96_7c5c12e4c1bd["tailwindcss"] d3ff87a1_ef49_dab7_2e4d_39270282fbd2 --> a8dc9eb6_c1a4_11e4_fc96_7c5c12e4c1bd style d3ff87a1_ef49_dab7_2e4d_39270282fbd2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as tailwindcss from 'tailwindcss'
import * as assets from './assets'
import { Instrumentation } from './instrumentation'
/**
* The type used by `<style>` tags that contain input CSS.
*/
const STYLE_TYPE = 'text/tailwindcss'
/**
* The current Tailwind CSS compiler.
*
* This gets recreated:
* - When stylesheets change
*/
let compiler: Awaited<ReturnType<typeof tailwindcss.compile>>
/**
* The list of all seen classes on the page so far. The compiler already has a
* cache of classes but this lets us only pass new classes to `build(…)`.
*/
let classes = new Set<string>()
/**
* The last input CSS that was compiled. If stylesheets "change" without
* actually changing, we can avoid a full rebuild.
*/
let lastCss = ''
/**
* The stylesheet that we use to inject the compiled CSS into the page.
*/
let sheet = document.createElement('style')
/**
* The queue of build tasks that need to be run. This is used to ensure that we
* don't run multiple builds concurrently.
*/
let buildQueue = Promise.resolve()
/**
* What build this is
*/
let nextBuildId = 1
/**
* Used for instrumenting the build process. This data shows up in the
* performance tab of the browser's devtools.
*/
let I = new Instrumentation()
/**
* Create the Tailwind CSS compiler
*
* This handles loading imports, plugins, configs, etc…
*
* This does **not** imply that the CSS is actually built. That happens in the
* `build` function and is a separate scheduled task.
*/
async function createCompiler() {
// ... (235 more lines)
Domain
Subdomains
Dependencies
- Instrumentation
- assets.ts
- instrumentation.ts
- tailwindcss
Source
Frequently Asked Questions
What does index.ts do?
index.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain, Scanner subdomain.
What functions are defined in index.ts?
index.ts defines 7 function(s): build, createCompiler, loadModule, loadStylesheet, observeSheet, rebuild, styleObserver.
What does index.ts depend on?
index.ts imports 4 module(s): Instrumentation, assets.ts, instrumentation.ts, tailwindcss.
Where is index.ts in the architecture?
index.ts is located at packages/@tailwindcss-browser/src/index.ts (domain: OxideEngine, subdomain: Scanner, directory: packages/@tailwindcss-browser/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free