index.ts — tailwindcss Source File
Architecture documentation for index.ts, a typescript file in the tailwindcss codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2e62a025_c320_60cb_6b4c_aa1efeed2ed9["index.ts"] f680db01_c2c6_090b_99ee_9df802d112b2["args.ts"] 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 --> f680db01_c2c6_090b_99ee_9df802d112b2 1aa953df_1d07_87e9_0511_dceb7d1d33bf["args"] 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 --> 1aa953df_1d07_87e9_0511_dceb7d1d33bf 4f7a7aa2_9429_8923_9b42_fc51471914fa["./commands/build"] 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 --> 4f7a7aa2_9429_8923_9b42_fc51471914fa dedd6830_c180_a2b0_01d1_b5874e938eb8["index.ts"] 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 --> dedd6830_c180_a2b0_01d1_b5874e938eb8 b3812df1_363e_a468_d814_9f5366025963["help"] 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 --> b3812df1_363e_a468_d814_9f5366025963 style 2e62a025_c320_60cb_6b4c_aa1efeed2ed9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
#!/usr/bin/env node
import { args, type Arg } from './utils/args'
import * as build from './commands/build'
import { help } from './commands/help'
const sharedOptions = {
'--help': { type: 'boolean', description: 'Display usage information', alias: '-h' },
} satisfies Arg
const flags = args({
...build.options(),
...sharedOptions,
})
const command = flags._[0]
// Right now we don't support any sub-commands. Let's show the help message
// instead.
if (command) {
help({
invalid: command,
usage: ['tailwindcss [options]'],
options: { ...build.options(), ...sharedOptions },
})
process.exit(1)
}
// Display main help message if no command is being used.
//
// E.g.:
//
// - `tailwindcss` // should show the help message
//
// E.g.: implicit `build` command
//
// - `tailwindcss -o output.css` // should run the build command, not show the help message
// - `tailwindcss > output.css` // should run the build command, not show the help message
if ((process.stdout.isTTY && process.argv[2] === undefined) || flags['--help']) {
help({
usage: ['tailwindcss [--input input.css] [--output output.css] [--watch] [options…]'],
options: { ...build.options(), ...sharedOptions },
})
process.exit(0)
}
// Handle the build command
build.handle(flags)
Domain
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 CommandLineInterface domain.
What does index.ts depend on?
index.ts imports 5 module(s): ./commands/build, args, args.ts, help, index.ts.
Where is index.ts in the architecture?
index.ts is located at packages/@tailwindcss-cli/src/index.ts (domain: CommandLineInterface, directory: packages/@tailwindcss-cli/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free