next.js/scripts/rm.mjs
rm.mjs14 lines365 B
// @ts-check
import { rm } from 'fs/promises'
import { join } from 'path'

const args = process.argv.slice(2)
if (args.length === 0) {
  throw new Error('rm.mjs: requires a least one parameter')
}
for (const arg of args) {
  const path = join(process.cwd(), arg)
  console.log(`rm.mjs: deleting path "${path}"`)
  await rm(path, { recursive: true, force: true })
}
Quest for Codev2.0.0
/
SIGN IN