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 ec32f4ad_301d_f256_4d47_ab98a998662b["git.ts"] 8d4c06fc_a152_c497_9c1b_b60c5c91b817["node:child_process"] ec32f4ad_301d_f256_4d47_ab98a998662b --> 8d4c06fc_a152_c497_9c1b_b60c5c91b817 8980fa32_c788_e52e_6c93_c76030922f8e["index.test.ts"] 8980fa32_c788_e52e_6c93_c76030922f8e --> ec32f4ad_301d_f256_4d47_ab98a998662b b2eb6cbf_d28d_9ec7_61c1_8992d8f4efb8["index.ts"] b2eb6cbf_d28d_9ec7_61c1_8992d8f4efb8 --> ec32f4ad_301d_f256_4d47_ab98a998662b style ec32f4ad_301d_f256_4d47_ab98a998662b 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 UpgradeToolkit domain, TemplateAnalysis 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: UpgradeToolkit, subdomain: TemplateAnalysis, 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