compile.ts — tailwindcss Source File
Architecture documentation for compile.ts, a typescript file in the tailwindcss codebase. 12 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 69d3ce9e_56db_8f40_5261_64f91b0dee31["compile.ts"] 42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 42640952_ea63_55f1_1ff1_00816e2980ae 86bd6fe2_9f1f_b240_a7e3_95be24dd3553["get-module-dependencies.ts"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 86bd6fe2_9f1f_b240_a7e3_95be24dd3553 39d805f8_9f8f_733c_5705_af4f5e4be064["getModuleDependencies"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 39d805f8_9f8f_733c_5705_af4f5e4be064 5e3855e0_f04e_28ee_98ea_8502e6531bc8["urls.ts"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 5e3855e0_f04e_28ee_98ea_8502e6531bc8 fa6eaba6_9ce1_3f40_275c_1ab85a97a856["rewriteUrls"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> fa6eaba6_9ce1_3f40_275c_1ab85a97a856 6f8c4a8c_1595_847b_d252_4173f478a307["enhanced-resolve"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 6f8c4a8c_1595_847b_d252_4173f478a307 24714876_b84f_1a7d_4039_81f1eb39489c["jiti"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 24714876_b84f_1a7d_4039_81f1eb39489c 6390fa3b_300d_6028_9e96_c869157db42d["node:fs"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 6390fa3b_300d_6028_9e96_c869157db42d 8118fcf2_a51d_d1a1_93d3_c71d3a646692["promises"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 8118fcf2_a51d_d1a1_93d3_c71d3a646692 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82["node:url"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82 a8dc9eb6_c1a4_11e4_fc96_7c5c12e4c1bd["tailwindcss"] 69d3ce9e_56db_8f40_5261_64f91b0dee31 --> a8dc9eb6_c1a4_11e4_fc96_7c5c12e4c1bd b2ba3368_7330_fe20_4543_9cafa8cfedc0["migrate-js-config.ts"] b2ba3368_7330_fe20_4543_9cafa8cfedc0 --> 69d3ce9e_56db_8f40_5261_64f91b0dee31 c8809718_3b35_1fdb_ff99_94e375c7360a["prepare-config.ts"] c8809718_3b35_1fdb_ff99_94e375c7360a --> 69d3ce9e_56db_8f40_5261_64f91b0dee31 style 69d3ce9e_56db_8f40_5261_64f91b0dee31 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import EnhancedResolve from 'enhanced-resolve'
import { createJiti, type Jiti } from 'jiti'
import fs from 'node:fs'
import fsPromises from 'node:fs/promises'
import path from 'node:path'
import { pathToFileURL } from 'node:url'
import {
__unstable__loadDesignSystem as ___unstable__loadDesignSystem,
compile as _compile,
compileAst as _compileAst,
Features,
Polyfills,
} from 'tailwindcss'
import type { AstNode } from '../../tailwindcss/src/ast'
import { getModuleDependencies } from './get-module-dependencies'
import { rewriteUrls } from './urls'
export { Features, Polyfills }
export type Resolver = (id: string, base: string) => Promise<string | false | undefined>
export interface CompileOptions {
base: string
from?: string
onDependency: (path: string) => void
shouldRewriteUrls?: boolean
polyfills?: Polyfills
customCssResolver?: Resolver
customJsResolver?: Resolver
}
function createCompileOptions({
base,
from,
polyfills,
onDependency,
shouldRewriteUrls,
customCssResolver,
customJsResolver,
}: CompileOptions) {
return {
base,
polyfills,
from,
async loadModule(id: string, base: string) {
return loadModule(id, base, onDependency, customJsResolver)
},
async loadStylesheet(id: string, sheetBase: string) {
let sheet = await loadStylesheet(id, sheetBase, onDependency, customCssResolver)
if (shouldRewriteUrls) {
sheet.content = await rewriteUrls({
css: sheet.content,
root: base,
base: sheet.base,
})
}
// ... (219 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- ast.ts
- enhanced-resolve
- get-module-dependencies.ts
- getModuleDependencies
- jiti
- node:fs
- node:path
- node:url
- promises
- rewriteUrls
- tailwindcss
- urls.ts
Imported By
Source
Frequently Asked Questions
What does compile.ts do?
compile.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the NodeBridge domain, NapiBinding subdomain.
What functions are defined in compile.ts?
compile.ts defines 13 function(s): __unstable__loadDesignSystem, compile, compileAst, createCompileOptions, ensureSourceDetectionRootExists, id, importModule, loadModule, loadStylesheet, path, and 3 more.
What does compile.ts depend on?
compile.ts imports 12 module(s): ast.ts, enhanced-resolve, get-module-dependencies.ts, getModuleDependencies, jiti, node:fs, node:path, node:url, and 4 more.
What files import compile.ts?
compile.ts is imported by 2 file(s): migrate-js-config.ts, prepare-config.ts.
Where is compile.ts in the architecture?
compile.ts is located at packages/@tailwindcss-node/src/compile.ts (domain: NodeBridge, subdomain: NapiBinding, directory: packages/@tailwindcss-node/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free