https://github.com/tj/node-prune
Remove unnecessary files from node_modules (.md, .ts, ...)
https://github.com/tj/node-prune
Last synced: 7 months ago
JSON representation
Remove unnecessary files from node_modules (.md, .ts, ...)
- Host: GitHub
- URL: https://github.com/tj/node-prune
- Owner: tj
- License: mit
- Created: 2017-11-19T01:11:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-30T20:59:44.000Z (about 3 years ago)
- Last Synced: 2025-04-11T00:05:24.630Z (8 months ago)
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 4,429
- Watchers: 38
- Forks: 132
- Open Issues: 24
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - tj/node-prune - Remove unnecessary files from node_modules (.md, .ts, ...) (others)
- awesome_frontend_development_resources - node-prune - Remove unnecessary files from node_modules (.md, .ts, etc). (Tools / React Components)
- awesome - node-prune - Remove unnecessary files from node_modules (.md, .ts, etc). (Tools / React Components)
- awesome-repositories - tj/node-prune - Remove unnecessary files from node_modules (.md, .ts, ...) (Go)
- awesome-github-star - node-prune
- awesome-frontend - node-prune - Remove unnecessary files from node_modules (0. 前端自动化(Workflow))
- awesome-front-end - node-prune - Remove unnecessary files from node_modules (0. 前端自动化(Workflow))
README

## 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
From [gobinaries.com](https://gobinaries.com):
```sh
$ curl -sf https://gobinaries.com/tj/node-prune | sh
```
From source:
```
$ go get github.com/tj/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)

