UNPKG

viject

Version:

A tool for migrating your React app from react-scripts (Create React App) to Vite

13 lines (12 loc) 333 B
import { execSync } from "node:child_process"; export const checkGitStatus = () => { let gitStatus = ""; try { const stdout = execSync("git status --porcelain", { stdio: ["pipe", "pipe", "ignore"], }).toString(); gitStatus = stdout.trim(); } catch (_) { } return gitStatus; };