Skip to content

Commit

Permalink
feat(@142vip/release-version): 支持bumpx多种配置文件格式
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl committed Jul 17, 2024
1 parent 3680d42 commit 16a5540
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 0 additions & 5 deletions packages/release-version/bump.config.ts

This file was deleted.

5 changes: 5 additions & 0 deletions packages/release-version/bumpx.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineBumpXConfig } from './src'

export default defineBumpXConfig({
all: true,
})
8 changes: 6 additions & 2 deletions packages/release-version/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function loadBumpConfig(
overrides?: Partial<VersionBumpOptions>,
cwd = process.cwd(),
) {
const name = 'bump'
const name = 'bumpx'
const configFile = findConfigFile(name, cwd)
const { config } = await loadConfig<VersionBumpOptions>({
name,
Expand Down Expand Up @@ -65,6 +65,10 @@ function findConfigFile(name: string, cwd: string) {
}
}

export function defineConfig(config: Partial<VersionBumpOptions>) {
/**
* 自定义配置入口
* @param config
*/
export function defineBumpXConfig(config: Partial<VersionBumpOptions>) {
return config
}

0 comments on commit 16a5540

Please sign in to comment.