Back to Napi Rs

Pre Publish

cli/docs/pre-publish.md

1.0.03.1 KB
Original Source

Pre Publish

This file is generated by cli/codegen. Do not edit this file manually.

Update package.json and copy addons into per platform packages

Usage

sh
# CLI
napi pre-publish [--options]
typescript
// Programatically
import { NapiCli } from '@napi-rs/cli'

new NapiCli().prePublish({
  // options
})

Options

OptionsCLI Optionstyperequireddefaultdescription
--help,-hget help
cwd--cwdstringfalseprocess.cwd()The working directory of where napi command will be executed in, all other paths options are relative to this path
configPath--config-path,-cstringfalsePath to napi config json file
packageJsonPath--package-json-pathstringfalse'package.json'Path to package.json
npmDir--npm-dir,-pstringfalse'npm'Path to the folder where the npm packages put
tagStyle--tag-style,--tagstyle,-t'npm' | 'lerna'false'lerna'git tag style, npm or lerna
ghRelease--gh-releasebooleanfalsetrueWhether create GitHub release
ghReleaseName--gh-release-namestringfalseGitHub release name
ghReleaseId--gh-release-idstringfalseExisting GitHub release id
skipOptionalPublish--skip-optional-publishbooleanfalsefalseWhether skip optionalDependencies packages publish
dryRun--dry-runbooleanfalsefalseDry run without touching file system