Info
The library is outdated. Use rimraf instead.
Small and simple lib for cleaning build files and folders before or after node builds (tsc (typescript), **webpack **, etc.).
The library is usable on Windows and Unix-like systems (macos, linux, ...)
Manager | Command |
---|---|
npm install -D tsc-cleaner |
|
yarn add -D tsc-cleaner |
|
pnpm add -D tsc-cleaner |
npx tsc-cleaner [--arguments]
npx tsc-cleaner --dir=dir_path
npx tsc-cleaner --file=file_path
npx tsc-cleaner --dir=dir_path --file=file_path
const clean = require('tsc-cleaner');
clean({dir: 'dir_path'});
clean({file: 'file_path'});
clean({dir: 'dir_path', file: 'file_path'});
Argument dir is always recursive
(package.json)
{
"scripts": {
"prebuild": "tsc-cleaner --dir=lib",
"build": "tsc",
"build:pack": "npm run build && npm pack"
}
}