Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qruzz/ryd
Zero dependency package to prune node_modules for unnecessary files as a post-build step.
https://github.com/qruzz/ryd
cli developer-tools node nodejs
Last synced: about 1 month ago
JSON representation
Zero dependency package to prune node_modules for unnecessary files as a post-build step.
- Host: GitHub
- URL: https://github.com/qruzz/ryd
- Owner: qruzz
- Created: 2020-04-26T14:17:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T23:44:35.000Z (over 2 years ago)
- Last Synced: 2024-11-03T04:12:59.848Z (about 2 months ago)
- Topics: cli, developer-tools, node, nodejs
- Language: TypeScript
- Homepage:
- Size: 206 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ryd
Zero-dependency package to prune node_modules for unnecessary files as a post-build step
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`:
```sh
$ yarn global add ryd
$ npm i -g ryd
```or as a normal package in a node project:
```sh
$ 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:
```sh
$ 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](./app/consts.ts).
## Issues
If any issues occur using this library, please fill our a detailed bug report on [GitHub](https://github.com/qruzz/ryd/issues).