feat(cli): support default cross-compilation targets from npmextra.json
This commit is contained in:
14
readme.md
14
readme.md
@@ -119,6 +119,20 @@ dist_rust/
|
||||
|
||||
`tsrust` automatically installs missing rustup targets via `rustup target add` when needed.
|
||||
|
||||
### Configuration via npmextra.json
|
||||
|
||||
You can set default cross-compilation targets in your project's `npmextra.json` file so you don't need to pass `--target` flags every time:
|
||||
|
||||
```json
|
||||
{
|
||||
"@git.zone/tsrust": {
|
||||
"targets": ["linux_arm64", "linux_amd64"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
When targets are configured in `npmextra.json`, simply running `tsrust` will cross-compile for all listed targets. CLI `--target` flags take full precedence — if any `--target` is provided, the `npmextra.json` targets are ignored entirely.
|
||||
|
||||
### 🗑️ Clean Only
|
||||
|
||||
Remove all build artifacts without rebuilding:
|
||||
|
||||
Reference in New Issue
Block a user