diff options
author | 2021-12-21 15:08:11 -0800 | |
---|---|---|
committer | 2021-12-21 15:08:11 -0800 | |
commit | 581f3540b6cde2c5d5cb628801dff07ebd04c1b7 (patch) | |
tree | f77e72d00cd4fc43a1db54a48a93ae0d7b1ea339 | |
parent | 68dabd4d25d6dd685f4ce653955a847963acfa4b (diff) | |
download | bun-581f3540b6cde2c5d5cb628801dff07ebd04c1b7.tar.gz bun-581f3540b6cde2c5d5cb628801dff07ebd04c1b7.tar.zst bun-581f3540b6cde2c5d5cb628801dff07ebd04c1b7.zip |
Mention bun install in readme (still writing)
-rw-r--r-- | README.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -24,6 +24,27 @@ curl -fsSL https://bun.sh/install | bash **JavaScript**: TODO +## Using Bun as a package manager + +On Linux, `bun install` tends to install packages 20x - 100x faster than `npm install`. On macOS, it's more like 4x - 80x. + +<img src="https://user-images.githubusercontent.com/709451/147004342-571b6123-17a9-49a2-8bfd-dcfc5204047e.png" height=200 /> + +To install packages from package.json: + +```bash +bun install +``` + +To add or remove packages from package.json: + +```bash +bun remove react +bun add preact +``` + +For performance, Bun uses a binary lockfile format called `bun.lockb`. You can print a Yarn v1-style `yarn.lock` file with `bun install --yarn` or just `bun i -y` for short. Bun's install cache lives in `$HOME/.bun/install/cache` and can safely be cleared at any time + ## Using Bun as a task runner Instead of waiting 170ms for your npm client to start for each task, you wait 6ms for Bun. |