@uxf/velo
v0.1.6
Published
TypeScript dependency tree generator using Rust WebAssembly
Downloads
710
Readme
@uxf/velo
A TypeScript dependency tree generator using Rust and WebAssembly.
Features
- Fast TypeScript/TSX parsing using
swc. - Aggregates i18n namespaces from components and their dependencies.
- Generates an optimized route-to-namespace map.
- Can be published to npm and used as a CLI.
Installation
npm install -g @uxf/veloUsage
uxf-velo <project-dir>Starting from the src/pages/ directory (standard for Next.js), it builds a dependency graph and extracts i18n namespaces (e.g., from t("ns:key") or <Trans i18nKey="ns:key" />).
Build from Source
Requirements:
- Rust (latest)
- wasm-pack
Initialization
Before the first build, run:
npm run initThis ensures the Rust target for WebAssembly is installed and all dependencies are present.
Building
To build the package:
npm run buildProduction Release and Publishing
This package includes a full publish pipeline:
Test the package:
npm run testFull Release (Automated):
npm run releaseThis script performs the following steps:
- Sets the Rust target for WebAssembly.
- Builds the WebAssembly package.
- Runs all tests.
- Increments the version (patch).
- Publishes to npm with public access.
Alternatively, you can manually run npm publish. The prepublishOnly script will automatically ensure the package is built and tested before being sent to the npm registry.
Output Format
The tool outputs a sorted JSON object mapping route keys to an array of unique, aggregated namespaces:
{
"*": [
"common",
"auth"
],
"/": [
"auth",
"common",
"uxf-form-text-input"
],
"/about": [
"about",
"common"
]
}