napi-rs/cli/docs/rename.md
forehal a781a4f27e feat(cli): brand new cli tool with both cli and programmatical usage (#1492)
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
2023-04-06 11:04:53 +08:00

36 lines
2.6 KiB
Markdown

# Rename
> This file is generated by cli/codegen. Do not edit this file manually.
Rename the napi-rs project
## Usage
```sh
# CLI
napi rename [--options]
```
```typescript
// Programatically
import { NapiCli } from '@napi-rs/cli'
new NapiCli().rename({
// options
})
```
## Options
| Options | CLI Options | type | required | default | description |
| --------------- | ------------------- | ------ | -------- | -------------- | ------------------------------------------------------------------------------------------------------------------ |
| | --help,-h | | | | get help |
| cwd | --cwd | string | false | process.cwd() | The working directory of where napi command will be executed in, all other paths options are relative to this path |
| packageJsonPath | --package-json-path | string | false | 'package.json' | Path to `package.json` |
| npmDir | --npm-dir | string | false | 'npm' | Path to the folder where the npm packages put |
| name | --name,-n | string | false | | The new name of the project |
| binaryName | --binary-name,-b | string | false | | The new binary name \*.node files |
| packageName | --package-name | string | false | | The new package name of the project |
| manifestPath | --manifest-path | string | false | 'Cargo.toml' | Path to `Cargo.toml` |
| repository | --repository | string | false | | The new repository of the project |
| description | --description | string | false | | The new description of the project |