mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
12 lines
290 B
TypeScript
12 lines
290 B
TypeScript
import { readdir, unlink } from 'node:fs/promises'
|
|
import { join } from 'node:path'
|
|
|
|
for (const file of await readdir('./dist', {
|
|
recursive: true,
|
|
withFileTypes: true,
|
|
})) {
|
|
if (file.isFile() && !file.name.endsWith('.d.ts')) {
|
|
await unlink(join(file.parentPath, file.name))
|
|
}
|
|
}
|