plugin-preloader
Version:
This library dynamically preloads and installs Babel and ESLint plugins and presets based on your configuration, streamlining the build process without the need to include them as dependencies in your project.
9 lines (6 loc) • 339 B
text/typescript
import { promisify } from "util";
import { exec, execSync as syncExec } from "child_process";
import { promises as fs, existsSync as syncExists } from "fs";
const asyncExec = promisify(exec);
const asyncExists = async (path: string) => !!(await fs.stat(path).catch(() => false));
export { asyncExec, asyncExists, syncExists, syncExec };