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 which lets you deploy serverless web applications in seconds.
$ go get github.com/kyleparisi/vendor-prune/cmd/vendor-prune
In your app directory:
$ vendor-prune
files total 27,330
files removed 3,990
size removed 13 MB
duration 200ms
Somewhere else:
$ vendor-prune path/to/vendor
files total 27,330
files removed 3,990
size removed 13 MB
duration 200ms
Or add to the package.json
scripts field
"scripts": {
"postinstall": "vendor-prune"
}