https://github.com/mununki/rescriptdep
A dependency analyzer for ReScript modules
https://github.com/mununki/rescriptdep
Last synced: about 1 year ago
JSON representation
A dependency analyzer for ReScript modules
- Host: GitHub
- URL: https://github.com/mununki/rescriptdep
- Owner: mununki
- License: mit
- Created: 2025-03-21T17:59:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-25T06:20:31.000Z (about 1 year ago)
- Last Synced: 2025-04-25T07:27:58.704Z (about 1 year ago)
- Language: OCaml
- Size: 1.11 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ReScriptDep
A dependency analyzer for ReScript modules.
## Introduction
ReScriptDep is a tool for analyzing dependencies between ReScript modules. It uses cmt files to identify module dependencies and can visualize them or output them in JSON format.
## Installation
```bash
# Install via opam
opam install rescriptdep
```
### Building with Static Linking (Linux)
To build rescriptdep with static linking on Linux, which creates a standalone executable without external dependencies:
```bash
# Build the project using the static profile
dune build --profile static
# This will generate a statically linked executable for Linux environments
```
## Usage
```bash
# Basic usage
rescriptdep [options] files_or_dirs
# Options
# -o, --output : Output file (default: stdout)
# -f, --format : Output format (dot, json)
# -m, --module : Focus on specific module and its dependencies
# -v, --verbose : Enable verbose output
# -b, --benchmark : Enable performance benchmarking
# --no-cache : Skip using cache
# --clear-cache : Clear the cache before analyzing
# -nd, --no-dependents : Find modules that have no dependents (not imported by any other modules)
# -vb, --value-binding : Count usage of a value binding (by name) across the project (in the module itself and all dependents; requires -m)
# -vl, --value-line : Line number of the value binding (1-based, for disambiguation when multiple bindings have the same name; use with -vb)
```
## Development
For detailed information about building the project, running tests, and contributing, please see [CONTRIBUTING.md](CONTRIBUTING.md).
### Quick Start for Development
```bash
# Build the project
dune build
# Run all tests
dune runtest
```
## License
MIT