UNPKG

ts-project-builder

Version:

Rollup-based TypeScript builder with multi-format output and built-in common plugins.

18 lines (15 loc) 537 B
import { stat } from 'node:fs/promises'; const pathIsFile = async (path) => (await stat(path).catch(() => { }))?.isFile(); function parseCliArgString(value) { const data = {}; value.split(',').forEach((part) => { const [key, value] = part.replaceAll(/\s+/g, '').split('='); if (value === undefined) key !== undefined && (data.default = key); else if (key) data[key] = value; }); return data; } export { parseCliArgString, pathIsFile }; //# sourceMappingURL=index.mjs.map