Skip to content

Commit

Permalink
Warn on --prepare is deprecated (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Nov 29, 2024
1 parent c7b1e01 commit 3e22e3c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ async function parseCliArgs(argv: string[]) {
type: 'boolean',
description: 'bundle type declaration files',
})
.option('prepare', {
type: 'boolean',
description: 'auto setup package.json for building',
})
.command(
'prepare',
'auto configure package.json exports for building',
Expand Down Expand Up @@ -158,6 +162,14 @@ async function parseCliArgs(argv: string[]) {
}
}

// Warn about this command being deprecated
if (args['prepare']) {
logger.warn(
'The "--prepare" option is deprecated. Please use `bunchee prepare` instead.',
)
return
}

const source: string = args._[0] as string
const parsedArgs: CliArgs = {
source,
Expand Down

0 comments on commit 3e22e3c

Please sign in to comment.