Home / File/ index.ts — tailwindcss Source File

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
  41320a40_1fd8_59af_1c95_f0b1d87cda08["index.ts"]
  9bf716c1_a944_1eb2_180b_5c0151e992ba["args.ts"]
  41320a40_1fd8_59af_1c95_f0b1d87cda08 --> 9bf716c1_a944_1eb2_180b_5c0151e992ba
  e9feacff_172e_20e8_5e0f_c6ccfd22ac0e["args"]
  41320a40_1fd8_59af_1c95_f0b1d87cda08 --> e9feacff_172e_20e8_5e0f_c6ccfd22ac0e
  6aba93f4_1bfd_76ae_a4e5_fd6928b4ae9e["./commands/build"]
  41320a40_1fd8_59af_1c95_f0b1d87cda08 --> 6aba93f4_1bfd_76ae_a4e5_fd6928b4ae9e
  48860a26_2cb5_7783_52eb_1425db7e2b6a["index.ts"]
  41320a40_1fd8_59af_1c95_f0b1d87cda08 --> 48860a26_2cb5_7783_52eb_1425db7e2b6a
  536d70f5_8cf8_3fe4_a1c5_0a1bd03cddb7["help"]
  41320a40_1fd8_59af_1c95_f0b1d87cda08 --> 536d70f5_8cf8_3fe4_a1c5_0a1bd03cddb7
  style 41320a40_1fd8_59af_1c95_f0b1d87cda08 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)

Dependencies

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 BuildIntegrations 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: BuildIntegrations, 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