git.ts — tailwindcss Source File
Architecture documentation for git.ts, a typescript file in the tailwindcss codebase. 1 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 3c7d5283_a874_1372_cf03_3576a82afd9f["git.ts"] 69c3e246_0d60_1a3b_6419_4c423b01252f["node:child_process"] 3c7d5283_a874_1372_cf03_3576a82afd9f --> 69c3e246_0d60_1a3b_6419_4c423b01252f 8110b4e3_7021_63c1_8868_4afb3b08a7de["index.test.ts"] 8110b4e3_7021_63c1_8868_4afb3b08a7de --> 3c7d5283_a874_1372_cf03_3576a82afd9f f3e20782_7a7a_6d07_0472_a959db30007c["index.ts"] f3e20782_7a7a_6d07_0472_a959db30007c --> 3c7d5283_a874_1372_cf03_3576a82afd9f style 3c7d5283_a874_1372_cf03_3576a82afd9f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { execSync } from 'node:child_process'
export function isRepoDirty(cwd?: string) {
try {
let stdout = execSync('git status --porcelain', { encoding: 'utf-8', cwd })
return stdout.trim() !== ''
} catch (error) {
// If it's not a git repository we don't know if it's dirty or not. But we
// also don't want to block the migration. Maybe we can still fail and
// require a `--force` flag?
if (error?.toString?.().includes('not a git repository')) {
return false
}
return true
}
}
Domain
Subdomains
Functions
Dependencies
- node:child_process
Source
Frequently Asked Questions
What does git.ts do?
git.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the CommandLineInterface domain, Renderer subdomain.
What functions are defined in git.ts?
git.ts defines 1 function(s): isRepoDirty.
What does git.ts depend on?
git.ts imports 1 module(s): node:child_process.
What files import git.ts?
git.ts is imported by 2 file(s): index.test.ts, index.ts.
Where is git.ts in the architecture?
git.ts is located at packages/@tailwindcss-upgrade/src/utils/git.ts (domain: CommandLineInterface, subdomain: Renderer, directory: packages/@tailwindcss-upgrade/src/utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free