mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 22:44:00 +00:00
30 lines
696 B
Rust
30 lines
696 B
Rust
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# trunk
|
|
|
|
> Bundle and serve Rust WASM web applications.
|
|
> More information: <https://trunkrs.dev/commands/>.
|
|
|
|
- Build the application in release mode and serve it locally:
|
|
|
|
`trunk serve --release`
|
|
|
|
- Build the application and serve it on a specific port:
|
|
|
|
`trunk serve {{[-p|--port]}} {{port}}`
|
|
|
|
- Build for production at a specific output directory:
|
|
|
|
`trunk build --release {{[-d|--dist]}} {{path/to/distribution}}`
|
|
|
|
- Build with a specific public URL path for hosting in a subdirectory:
|
|
|
|
`trunk build --release --public-url /{{path/to/app_subdirectory}}`
|
|
|
|
- Clean the output directory:
|
|
|
|
`trunk clean`
|