Skip to content
/ ryd Public

Zero dependency package to prune node_modules for unnecessary files as a post-build step.

Notifications You must be signed in to change notification settings

qruzz/ryd

Repository files navigation

ryd

Zero-dependency package to prune node_modules for unnecessary files as a post-build step



version bundle-size licence

If the library has has helped you, please consider giving it a ⭐️

ryd is a zero dependency npm package that can be used to prune unnecessary files from ./node_modules, such as markdown files, typescript source files and so on. The intention for this is to be used as either a post-build step in your pipeline or within a docker layer to decrease the size of your final image.

Why?

The node_modules folder is know for being notoriously large, and anything that can be used to decrease the size is welcomed.

Why another npm package?

The irony that this is an npm package is not lost on my, however this package was developed to handle a very specific use case that was to prune the node_modules after a multistage build in a node docker image.

How?

Installing

ryd can be installed globally on a system using either yarn or npm:

$ yarn global add ryd
$ npm i -g ryd

or as a normal package in a node project:

$ yarn add ryd
$ npm i ryd

Using

When you call ryd, it assumes that there is a node_modules folder in the current working directory. If you are calling ryd from somewhere else, you can specify the absolute path to the node_modules as an argument:

$ ryd [absolute_path_to_node_modules]

Notes

If you would like a exhaustive list of files/folders that ryd will remove, they can be found in the consts file.

Issues

If any issues occur using this library, please fill our a detailed bug report on GitHub.

About

Zero dependency package to prune node_modules for unnecessary files as a post-build step.

Topics

Resources

Stars

Watchers

Forks