Bun: A fast all in one toolkit for JS and TS.
A 19y/o self-learned ethical hacker, mainly interested in bug hunting, malware analysis, and digital forensics. Currently expertise in SEO, OSINT, ethical hacking, WordPress, Shopify, front-end web.
It is an all-in-one toolkit for developing modern JavaScript/TypeScript applications.
It has -
Bun Runtime - a fast JavaScript runtime designed as a drop in replacement for node.js
Try -bun runBun Package Manager - install packages almost 30x faster than npm using with global cache and workspace.
Try -bun installBun Test Runner - fast, built-in, Jest-compatible test runner with TypeScript support, lifecycle hooks, mocking, and watch mode.
Try -bun testBun Bundler - Bundle Typescript, JSX, React and CSS for browsers and servers.
Try -bun build
bun run start # run the `start` script
bun install <pkg> # install a package
bun build ./index.tsx # bundle a project for browsers
bun test # run tests
bunx cowsay 'Hello, world!' # execute a package
Bun Runtime
Execute JavaScript/TypeScript files, package.json scripts, and executable packages with Bun’s fast runtime.
Run a file - Use
bun runto execute a source file likebun run index.js. (we can skip the run keyword if we want)Run a file in watch mode -
bun --watch run index.tsxRun a package.json script -
bun [bun flags] run <script> [script flags]likebun run devTo see a list of available scripts, run
bun runwithout any arguments.It’s common for
package.jsonscripts to reference locally-installed CLIs likeviteornext. However, you can override this behavior with the--bunflag.
Watch Mode - Automatic reloading in Bun with —watch and —hot modes