File tree Expand file tree Collapse file tree 4 files changed +76
-0
lines changed Expand file tree Collapse file tree 4 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ # bun i
2+
3+ > This command is an alias of ` bun install ` .
4+
5+ - View documentation for the original command:
6+
7+ ` tldr bun install `
Original file line number Diff line number Diff line change 1+ # bun install
2+
3+ > Install JavaScript dependencies for a project from ` package.json ` .
4+ > More information: < https://bun.com/docs/cli/install > .
5+
6+ - Install all dependencies listed in ` package.json ` :
7+
8+ ` bun {{[i|install]}} `
9+
10+ - Install a single package (this is an alias for ` bun add ` ):
11+
12+ ` bun {{[i|install]}} {{package_name}}@{{version}} `
13+
14+ - Install a package globally:
15+
16+ ` bun {{[i|install]}} {{[-g|--global]}} {{package_name}} `
17+
18+ - Install only production dependencies (skips ` devDependencies ` ):
19+
20+ ` bun {{[i|install]}} --production `
21+
22+ - Install dependencies exactly from the ` bun.lockb ` lockfile (frozen lockfile):
23+
24+ ` bun {{[i|install]}} --frozen-lockfile `
25+
26+ - Force re-download all packages from the registry, ignoring the cache:
27+
28+ ` bun {{[i|install]}} {{[-f|--force]}} `
Original file line number Diff line number Diff line change 1+ # bun run
2+
3+ > Execute a JavaScript/TypeScript file, or a script from ` package.json ` .
4+ > More information: < https://bun.com/docs/cli/run > .
5+
6+ - Run a script defined in ` package.json ` :
7+
8+ ` bun run {{script_name}} `
9+
10+ - Run a JavaScript or TypeScript file directly:
11+
12+ ` bun run {{path/to/file.ts}} `
13+
14+ - Run a file in "watch" mode (restarts automatically when the file changes):
15+
16+ ` bun run --watch {{path/to/file.ts}} `
17+
18+ - Run a file using a specific configuration file:
19+
20+ ` bun run --config {{path/to/bunfig.toml}} {{path/to/file.ts}} `
Original file line number Diff line number Diff line change 1+ # bun test
2+
3+ > Run tests using Bun's built-in test runner.
4+ > It is a fast, Jest-compatible test runner that looks for ` *.test.ts ` (and similar) files.
5+ > More information: < https://bun.com/docs/cli/test > .
6+
7+ - Run all test files found in the project:
8+
9+ ` bun test `
10+
11+ - Run a specific test file or directory:
12+
13+ ` bun test {{path/to/file.test.ts}} `
14+
15+ - Run tests in "watch" mode (re-runs automatically on file changes):
16+
17+ ` bun test --watch `
18+
19+ - Run tests and generate a code coverage report:
20+
21+ ` bun test --coverage `
You can’t perform that action at this time.
0 commit comments