mirror of
https://github.com/wahyd4/node-prune.git
synced 2026-08-17 17:15:54 +10:00
56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
<img src="http://tjholowaychuk.com:6000/svg/title/NODE/PRUNE">
|
|
|
|
## What?
|
|
|
|
node-prune is a small tool to prune unnecessary files from ./node_modules, such as markdown, typescript source files, and so on. Primarily built for [Up](https://github.com/apex/up) which lets you deploy serverless web applications in seconds.
|
|
|
|
## Installation
|
|
|
|
```
|
|
$ go get github.com/tj/node-prune/cmd/node-prune
|
|
```
|
|
|
|
## Usage
|
|
|
|
In your app directory:
|
|
|
|
```
|
|
$ node-prune
|
|
|
|
files total 27,330
|
|
files removed 3,990
|
|
size removed 13 MB
|
|
duration 200ms
|
|
```
|
|
|
|
Somewhere else:
|
|
|
|
```
|
|
$ node-prune path/to/node_modules
|
|
|
|
files total 27,330
|
|
files removed 3,990
|
|
size removed 13 MB
|
|
duration 200ms
|
|
```
|
|
|
|
Or add to the ``package.json`` scripts field
|
|
|
|
```
|
|
"scripts": {
|
|
"postinstall": "node-prune"
|
|
}
|
|
```
|
|
|
|
## Why?
|
|
|
|

|
|
|
|
---
|
|
|
|
[](https://godoc.org/github.com/tj/node-prune)
|
|

|
|

|
|
|
|
<a href="https://apex.sh"><img src="http://tjholowaychuk.com:6000/svg/sponsor"></a>
|