UNPKG

@serpent/common-cli

Version:

通用的 cli 相关的函数

53 lines (50 loc) 2.31 kB
import { n as assertDir, j as assertFile, e as ensureDir, d as ensureFile, g as exists, k as existsDir, h as existsFile, l as existsNotDir, i as existsNotFile, a as findupDir, f as findupFile, b as findupPackage, c as findupPackageRoot, m as mkdirp, o as ospath, r as rm, s as stat, p as toOSPath, q as toPosixPath, u as toWin32Path, t as tryStat, w as walk } from './context-96dcd180.mjs'; import { D as Dir, J as JsonFile, p as parseJsonContentFormat, r as readFile, t as tryReadFile, w as writeFile, a as writeJsonFile } from './Dir-b98fddc7.mjs'; import { P as PROJECT_NAME_REGEXP, c as PROJECT_NAME_REGEXP_END, a as PROJECT_NAME_REGEXP_FULL, b as PROJECT_NAME_REGEXP_START, d as assertProjectRootDir, i as isProjectRootDir, p as parseProjectInstallName, g as tryGetProjectBinFile, f as tryGetProjectDir, e as tryGetProjectFile, t as tryGetProjectRootDir } from './project-0299066e.mjs'; import { r as readJsonFile, t as tryReadJsonFile } from './readJsonFile-255f65c0.mjs'; var fs = /*#__PURE__*/Object.freeze({ __proto__: null, Dir: Dir, JsonFile: JsonFile, PROJECT_NAME_REGEXP: PROJECT_NAME_REGEXP, PROJECT_NAME_REGEXP_END: PROJECT_NAME_REGEXP_END, PROJECT_NAME_REGEXP_FULL: PROJECT_NAME_REGEXP_FULL, PROJECT_NAME_REGEXP_START: PROJECT_NAME_REGEXP_START, assertDir: assertDir, assertFile: assertFile, assertProjectRootDir: assertProjectRootDir, ensureDir: ensureDir, ensureFile: ensureFile, exists: exists, existsDir: existsDir, existsFile: existsFile, existsNotDir: existsNotDir, existsNotFile: existsNotFile, findupDir: findupDir, findupFile: findupFile, findupPackage: findupPackage, findupPackageRoot: findupPackageRoot, isProjectRootDir: isProjectRootDir, mkdirp: mkdirp, ospath: ospath, parseJsonContentFormat: parseJsonContentFormat, parseProjectInstallName: parseProjectInstallName, readFile: readFile, readJsonFile: readJsonFile, rm: rm, stat: stat, toOSPath: toOSPath, toPosixPath: toPosixPath, toWin32Path: toWin32Path, tryGetProjectBinFile: tryGetProjectBinFile, tryGetProjectDir: tryGetProjectDir, tryGetProjectFile: tryGetProjectFile, tryGetProjectRootDir: tryGetProjectRootDir, tryReadFile: tryReadFile, tryReadJsonFile: tryReadJsonFile, tryStat: tryStat, walk: walk, writeFile: writeFile, writeJsonFile: writeJsonFile }); export { fs as f };