Home / File/ standalone.test.ts — tailwindcss Source File

standalone.test.ts — tailwindcss Source File

Architecture documentation for standalone.test.ts, a typescript file in the tailwindcss codebase. 5 imports, 0 dependents.

File typescript Oxide PreProcessors 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  40d96c70_91aa_658f_3d90_0ab07b26604c["standalone.test.ts"]
  7600373a_3645_efb1_bcbb_e7c3fcb813ac["utils.ts"]
  40d96c70_91aa_658f_3d90_0ab07b26604c --> 7600373a_3645_efb1_bcbb_e7c3fcb813ac
  ce18acb2_833c_61a7_166d_0fd7613ce1c0["candidate"]
  40d96c70_91aa_658f_3d90_0ab07b26604c --> ce18acb2_833c_61a7_166d_0fd7613ce1c0
  44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04["test"]
  40d96c70_91aa_658f_3d90_0ab07b26604c --> 44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04
  05950b06_34e4_40bd_2622_1cfda03546ff["node:os"]
  40d96c70_91aa_658f_3d90_0ab07b26604c --> 05950b06_34e4_40bd_2622_1cfda03546ff
  89aef3dd_1eed_c141_d425_b8949215a653["node:path"]
  40d96c70_91aa_658f_3d90_0ab07b26604c --> 89aef3dd_1eed_c141_d425_b8949215a653
  style 40d96c70_91aa_658f_3d90_0ab07b26604c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import os from 'node:os'
import path from 'node:path'
import { candidate, css, html, js, json, test, ts } from '../utils'

const STANDALONE_BINARY = (() => {
  switch (os.platform()) {
    case 'win32':
      return 'tailwindcss-windows-x64.exe'
    case 'darwin':
      return os.arch() === 'x64' ? 'tailwindcss-macos-x64' : 'tailwindcss-macos-arm64'
    case 'linux':
      return os.arch() === 'x64' ? 'tailwindcss-linux-x64' : 'tailwindcss-linux-arm64'
    default:
      throw new Error(`Unsupported platform: ${os.platform()} ${os.arch()}`)
  }
})()

test(
  'includes first-party plugins',
  {
    fs: {
      'package.json': json`
        {
          "dependencies": {
            "tailwindcss": "workspace:^",
            "@tailwindcss/cli": "workspace:^"
          }
        }
      `,
      'index.html': html`
        <div className="prose">
          <h1>Headline</h1>
        </div>
        <input type="text" class="form-input" />
        <div class="aspect-w-16"></div>
      `,
      'src/index.css': css`
        @reference 'tailwindcss/theme';
        @import 'tailwindcss/utilities';

        @plugin '@tailwindcss/forms';
        @plugin '@tailwindcss/typography';
        @plugin '@tailwindcss/aspect-ratio';
      `,
    },
  },
  async ({ fs, exec }) => {
    await exec(
      `${path.resolve(__dirname, `../../packages/@tailwindcss-standalone/dist/${STANDALONE_BINARY}`)} --input src/index.css --output dist/out.css`,
    )

    await fs.expectFileToContain('dist/out.css', [
      candidate`form-input`,
      candidate`prose`,
      candidate`aspect-w-16`,
    ])
  },
)

test(
// ... (105 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does standalone.test.ts do?
standalone.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, PreProcessors subdomain.
What functions are defined in standalone.test.ts?
standalone.test.ts defines 1 function(s): STANDALONE_BINARY.
What does standalone.test.ts depend on?
standalone.test.ts imports 5 module(s): candidate, node:os, node:path, test, utils.ts.
Where is standalone.test.ts in the architecture?
standalone.test.ts is located at integrations/cli/standalone.test.ts (domain: Oxide, subdomain: PreProcessors, directory: integrations/cli).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free