How
This is written in Rust! (Or any compile-to-native language).
Benchmark (hyperfine "dum foo" "npm run foo" --warmup 10):
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
dum foo |
41.7 ± 1.2 | 39.8 | 44.6 | 1.00 |
npm run foo |
333.7 ± 2.0 | 330.0 | 336.0 | 8.01 ± 0.23 |
Install
Homebrew
Arch Linux AUR
# or
Check https://aur.archlinux.org/packages/dum for version info.
Shell
|
Cargo
Scoop
scoop install dum
GitHub Releases
Download a release manually and move it to /usr/local/bin manually.
Usage
dum <npm_script|bin_script> [...args_to_forward]: Run npm scripts or scripts in node_modules/.bin, like yarn run, npm run, npx.
If you want to pass flags to dum itself, like the -c flag to change directory, you should put it before the script name, like dum -c another/directory script_name --forward some_flag.
Examples:
# Like npx, but mush faster
# Change working directory
# More
Install Packages
Dum is not a package manager yet, but we forward install, add, remove commands to the package manager you're currently using:
# Run `npm i` or `yarn` or `pnpm i` depending on the project
# Like above but add packages
We detect the package manager automatically by checking for lock files in the current directory. If no lock file is found, we ask you to select a package manager first.
Limitations
- package.json vars are not supported, I personally never used it, if you believe it's necessary, please leave a comment here.
Inspiration
I want to try and learn Rust so I made this. Inspired by bun.
Development
Sponsors
License
MIT © EGOIST