@tybys/prune-node-modules
v1.0.1
Published
Prune node_modules
Downloads
4
Readme
prune-node-modules
Install
npm install @tybys/prune-node-modules
Usage
JavaScript
const path = require('path')
const { pnm } = require('@tybys/prune-node-modules')
const input = path.join(__dirname)
pnm(input)
TypeScript
import * as path from 'path'
import { pnm } from '@tybys/prune-node-modules'
const input = path.join(__dirname)
pnm(input)
API
export declare interface PruneOptions {
/** Glob patterns */
whitelist?: string[]
/** File names */
removeFiles?: string[]
/** Directory names */
removeDirs?: string[]
/** For application production */
production?: boolean
}
export declare class Pruner {
static prune (dir: string, options?: PruneOptions): void
constructor (options?: PruneOptions)
prune (dir: string): void
}
export declare function pnm (dir: string, options?: PruneOptions): void
License
MIT.