3
Watch
151
Star
0
Fork
1
Issue

File system in zx style

antfu
antfu
pushedAt 11 months ago

antfu/fsxx

fsxx

NPM version

File system in zx style.

import { read, io, cd } from 'fsxx'

console.log(await read`README.md`)

let { name } = await read.json`package.json`

cd('packages')
const { data, save } = await io.json`./core/package.json`
data.version = '0.1.1'
await save()

const isMIT = read.sync`LICENSE`.includes('MIT')

EXPERIMENTAL: APIs are very likely to be overhauled in the future.

Sponsors

License

MIT License © 2021 Anthony Fu

ucloud ads