UNPKG

@stryke/fs

Version:

A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.

2 lines (1 loc) 277 B
import{installPackage as n}from"@antfu/install-pkg";import{resolve as s}from"@stryke/path/resolve";import"tinyexec";export const install=async(t,a)=>n(t,a),packageExists=async(t,a)=>{const r=await s(a?.cwd||process.cwd());try{await s(t,{paths:[r]})}catch{await install(t,a)}};