@pkg-tools/clean
A build artifact cleaning tool with typed configuration.
This CLI is a thin abstraction on top of ShellJs. It centralizes our usage of ShellJS's rm
command.
Install
# w/ pnpm
pnpm add -D @pkg-tools/clean @pkg-tools/config
# w/ yarn
yarn add -D @pkg-tools/clean @pkg-tools/config
# w/ npm
npm install -D @pkg-tools/clean @pkg-tools/config
Usage
In your package.json
, you can use the exported cli clean
in your clean script e.g.
"scripts": {
"clean": "clean"
}
Configure
Define a pkg.config.ts
in the root of your package and add the following.
import { defineConfig } from '@pkg-tools/config';
export default defineConfig({
clean: {
directory: './dist',
},
});