https://github.com/ulivz/depcost
Retrieve the time and space cost of a dependency
https://github.com/ulivz/depcost
dependencies nodemodule performance
Last synced: 3 months ago
JSON representation
Retrieve the time and space cost of a dependency
- Host: GitHub
- URL: https://github.com/ulivz/depcost
- Owner: ulivz
- License: mit
- Created: 2020-03-02T12:58:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-13T08:58:44.000Z (over 5 years ago)
- Last Synced: 2025-06-02T09:44:43.935Z (5 months ago)
- Topics: dependencies, nodemodule, performance
- Language: JavaScript
- Homepage:
- Size: 207 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# depcost
[](https://npmjs.com/package/depcost) [](https://npmjs.com/package/depcost)  [](https://codecov.io/gh/rich-lab/depcost)
e.g. retrieve the time & space cost of latest 5 versions offs-extra
.## Introduction
**depcost** (abbr. **dc**) is a cli tool for you to judge whether a node module deserve your favor via knowing the time and space cost of a dependency.
## Features
- With **Require time**, you will know if the dependency you are using now is likely to **slow down** your node application.
- With **Install size** of a dependency, you will know if the dependency is too cumbersome and **wastes your disk.**
- Quickly specify the latest released versions.## Install
```bash
npm install depcost -g
```## Usage
Using `depcost` or its shortcut `dc`:
```bash
Usage:
$ depcost [...pkgs]For more info, run any command with the `--help` flag:
$ depcost --helpOptions:
-t, --track Whether to keep temp directory.
-r, --latest-versions Specify the count of latest versions.
-s, --versions Select specific versions.
-l, --log-level log level of npmlog under the hood.
-n, --npm-client set npm client, defaults to npm.
-d, --debug Shortcut to set log level to "debug".
-h, --help Display this message
-v, --version Display version number
```Examples:
```bash
depcost [package]
depcost [package] --log-level=info
depcost [package] --debug
depcost [package@version]
depcost [package1] [package2] [package3]
depcost [package] --latest-versions=3
depcost [package] --versions=1.0.0,2.0.0
```## Global Config
You can set global options at `~/.depcostrc` with ini syntax.
e.g., set npmClient to `tnpm` globally:
```bash
echo 'npmClient=tnpm' > ~/.depcostrc
```## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## Author
**depcost** © [ULIVZ](https://github.com/ulivz) under [Richlab Team](https://www.yuque.com/richlab/join-us/invitation), Released under the [MIT](./LICENSE) License.