Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toyobayashi/prune-node-modules
Prune node_modules
https://github.com/toyobayashi/prune-node-modules
Last synced: 2 days ago
JSON representation
Prune node_modules
- Host: GitHub
- URL: https://github.com/toyobayashi/prune-node-modules
- Owner: toyobayashi
- License: mit
- Created: 2019-12-03T11:15:00.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T14:06:44.000Z (8 months ago)
- Last Synced: 2024-10-11T20:58:34.224Z (27 days ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# prune-node-modules
## Install
```
npm install @tybys/prune-node-modules
```## Usage
### JavaScript
``` js
const path = require('path')
const { pnm } = require('@tybys/prune-node-modules')const input = path.join(__dirname)
pnm(input)
```### TypeScript
``` ts
import * as path from 'path'
import { pnm } from '@tybys/prune-node-modules'const input = path.join(__dirname)
pnm(input)
```## API
``` ts
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.