Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tj/node-prune

Remove unnecessary files from node_modules (.md, .ts, ...)
https://github.com/tj/node-prune

Last synced: about 2 months ago
JSON representation

Remove unnecessary files from node_modules (.md, .ts, ...)

Awesome Lists containing this project

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?

![huge](https://pbs.twimg.com/media/DEIV_1XWsAAlY29.jpg)

---

[![GoDoc](https://godoc.org/github.com/tj/node-prune?status.svg)](https://godoc.org/github.com/tj/node-prune)
![](https://img.shields.io/badge/license-MIT-blue.svg)
![](https://img.shields.io/badge/status-stable-green.svg)