Package Exports
- @varlet/release
Readme
Varlet Release
English | 中文
Intro
Varlet Release is a tool to release all packages and generate changelogs.
Installation
npm
npm i @varlet/release -Dyarn
yarn add @varlet/release -Dpnpm
pnpm add @varlet/release -DUsage
Using Command
# Release all packages and generate changelogs
npx vr release
# Specify remote name
npx vr release -r <remote>
# or
npx vr release --remote <remote>
# Just generate changelogs
npx vr changelog
# Specify changelog filename
npx vr changelog -f <filename>
# or
npx vr changelog --file <filename>
Configuration
release
| Params | Instructions |
|---|---|
| -r --remote |
Specify remote name |
changelog
| Params | Instructions |
|---|---|
| -f --file |
Specify changelog filename |
| -rc --releaseCount |
Release count |
Custom Handle
Example
import { release, changelog } from '@varlet/release'
// Do what you want to do...
release()You can pass in a task that will be called before the publish after the package version is changed.
import { release, changelog } from '@varlet/release'
async function task() {
await doSomething1()
await doSomething2()
}
release({ task })Types
interface ReleaseCommandOptions {
remote?: string
task?(): Promise<void>
}
function release(options: ReleaseCommandOptions): Promise<void>
interface ChangelogCommandOptions {
file?: string
releaseCount?: number
}
function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>