A dependency analyzer for ReScript modules.
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.
# Install via opam
opam install rescriptdepTo build rescriptdep with static linking on Linux, which creates a standalone executable without external dependencies:
# Build the project using the static profile dune build --profile static # This will generate a statically linked executable for Linux environments
# Basic usage rescriptdep [options] files_or_dirs # Options # -o, --output <file> : Output file (default: stdout) # -f, --format <format> : Output format (dot, json) # -m, --module <name> : 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 <name> : Count usage of a value binding (by name) across the project (in the module itself and all dependents; requires -m) # -vl, --value-line <line> : Line number of the value binding (1-based, for disambiguation when multiple bindings have the same name; use with -vb)
For detailed information about building the project, running tests, and contributing, please see CONTRIBUTING.md.
# Build the project dune build # Run all tests dune runtest
MIT