Update from-npm-install-to-bun-install.md

This commit is contained in:
Jarred Sumner
2024-09-22 00:23:44 -07:00
parent 60d8c8ad4c
commit 1eab8ec107

View File

@@ -31,12 +31,12 @@ $ bun rm @types/bun
Run scripts from package.json, executables from `node_modules/.bin` (sort of like `npx`), and JavaScript/TypeScript files (just like `node`) - all from a single simple command.
| NPM | Bun |
| ---------------- | ---------------- |
| `npm <script>` | `bun <script>` |
| `npm exec <bin>` | `bun run <bin>` |
| `npx <package>` | `bunx <package>` |
| `node <file>` | `bun <file>` |
| NPM | Bun |
| ------------------ | ---------------- |
| `npm run <script>` | `bun <script>` |
| `npm exec <bin>` | `bun <bin>` |
| `node <file>` | `bun <file>` |
| `npx <package>` | `bunx <package>` |
When you use `bun run <executable>`, it will choose the locally-installed executable