mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Docs: Minor fixes and improvements (#25284)
This PR addresses several issues opened for the docs: - Add callout for SQLite caching behavior between prepare() and query() - Fix SQLite types and fix deprecated exec to run - Fix Secrets API example - Update SolidStart guide - Add bun upgrade guide - Prefer `process.versions.bun` over `typeof Bun` for detection - Document complete `bunx` flags - Improve Nitro preset documentation for Nuxt Fixes #23165, #24424, #24294, #25175, #18433, #16804, #22967, #22527, #10560, #14744
This commit is contained in:
49
docs/snippets/cli/bunx.mdx
Normal file
49
docs/snippets/cli/bunx.mdx
Normal file
@@ -0,0 +1,49 @@
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
bunx [flags] <package>[@version] [flags and arguments for the package]
|
||||
```
|
||||
|
||||
Execute an npm package executable (CLI), automatically installing into a global shared cache if not installed in `node_modules`.
|
||||
|
||||
### Flags
|
||||
|
||||
<ParamField path="--bun" type="boolean">
|
||||
Force the command to run with Bun instead of Node.js, even if the executable contains a Node shebang (`#!/usr/bin/env
|
||||
node`)
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="-p, --package" type="string">
|
||||
Specify package to install when binary name differs from package name
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="--no-install" type="boolean">
|
||||
Skip installation if package is not already installed
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="--verbose" type="boolean">
|
||||
Enable verbose output during installation
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="--silent" type="boolean">
|
||||
Suppress output during installation
|
||||
</ParamField>
|
||||
|
||||
### Examples
|
||||
|
||||
```bash terminal icon="terminal"
|
||||
# Run Prisma migrations
|
||||
bunx prisma migrate
|
||||
|
||||
# Format a file with Prettier
|
||||
bunx prettier foo.js
|
||||
|
||||
# Run a specific version of a package
|
||||
bunx uglify-js@3.14.0 app.js
|
||||
|
||||
# Use --package when binary name differs from package name
|
||||
bunx -p @angular/cli ng new my-app
|
||||
|
||||
# Force running with Bun instead of Node.js, even if the executable contains a Node shebang
|
||||
bunx --bun vite dev foo.js
|
||||
```
|
||||
Reference in New Issue
Block a user