0.0.3 • Published 9 months ago

tsc-cleaner v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

tsc-cleaner

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, ...)



Installation

ManagerCommand
npm install -D tsc-cleaner
yarn add -D tsc-cleaner
pnpm add -D tsc-cleaner

Usage

Command line

npx tsc-cleaner [--arguments]

example:

npx tsc-cleaner --dir=dir_path

npx tsc-cleaner --file=file_path

npx tsc-cleaner --dir=dir_path --file=file_path

Javascript

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


Use in practice

(package.json)

{
  "scripts": {
    "prebuild": "tsc-cleaner --dir=lib",
    "build": "tsc",
    "build:pack": "npm run build && npm pack"
  }
}

License

MIT © Dárius Bokor