Coder Social home page Coder Social logo

dum's Introduction






dum replaces npm run and npx.
Instead of waiting 200ms for your npm client to start, it will start immediately.
💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.


CleanShot 2021-11-20 at 15 23 54@2x




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

brew install egoist/tap/dum

Shell

curl -sSL https://bina.egoist.sh/egoist/dum | sh

Cargo

cargo 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:

dum some-npm-script

dum some-npm-script --flags will --be forwarded
# Like npx, but mush faster
dum some-npm-package-cli-name --flags will --be forwarded

# Change working directory
dum -c packages/sub-package build

# More
dum --help

Install Packages

Dum is not a package manager yet, but we forward install, add, remove commands to npm, pnpm and yarn automatically:

# Run `npm i` or `yarn` or `pnpm i` depending on the project
dum install # or `dum i`
# Like above but add packages
dum add react vue -D

dum remove react vue

Limitations

Inspiration

I want to try and learn Rust so I made this. Inspired by bun.

Sponsors

sponsors

License

MIT © EGOIST

dum's People

Contributors

beetcb avatar egoist avatar fannheyward avatar kocal avatar sachinraja avatar ycjcl868 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.