ok-file:CLI检查给定文件是否存在并且不为空

时间:2021-05-01 22:52:11
【文件属性】:
文件名称:ok-file:CLI检查给定文件是否存在并且不为空
文件大小:121KB
文件格式:ZIP
更新时间:2021-05-01 22:52:11
cli utility test file-system JavaScript 好的文件 CLI检查给定文件是否存在并且不为空 有助于确认生成文件的工具是否成功。 安装 需要版本6或更高版本。 npm install --save-dev ok-file 用 检查给定文件foo.txt存在并且不为空 $(npm bin)/ok-file foo.txt 您可以传递多个文件,每个文件都会被检查 $(npm bin)/ok-file foo.txt bar.js 您甚至可以传递通配符字符串来查找文件 $(npm bin)/ok-file 'videos/*.mp4' 您可以将文件名与通配符结合使用 $(npm bin)/ok-file package.json 'src/*.js' 原料药 您可以使用API​​检查单个文件名或通配符 const okFile = require ( 'ok-file' ) okFile ( 'file/name' ) // or ok
【文件预览】:
ok-file-master
----.gitignore(38B)
----package.json(2KB)
----.npmrc(85B)
----package-lock.json(486KB)
----src()
--------index.js(2KB)
--------ok-file-spec.js(1KB)
----bin()
--------ok-file.js(358B)
----.travis.yml(501B)
----issue_template.md(389B)
----.github()
--------workflows()
----README.md(4KB)
----renovate.json(440B)

网友评论