fix(cli): tsdown define error
This commit is contained in:
parent
698ce3ef59
commit
6677dcae62
@ -1,9 +1,8 @@
|
|||||||
import cac from 'cac'
|
import cac from 'cac'
|
||||||
|
import { version } from '../package.json'
|
||||||
import { Mode } from './constants.js'
|
import { Mode } from './constants.js'
|
||||||
import { run } from './run.js'
|
import { run } from './run.js'
|
||||||
|
|
||||||
declare const __CLI_VERSION__: string
|
|
||||||
|
|
||||||
const cli = cac('create-vuepress-theme-plume')
|
const cli = cac('create-vuepress-theme-plume')
|
||||||
|
|
||||||
cli
|
cli
|
||||||
@ -16,6 +15,6 @@ cli
|
|||||||
|
|
||||||
cli.help()
|
cli.help()
|
||||||
|
|
||||||
cli.version(__CLI_VERSION__)
|
cli.version(version)
|
||||||
|
|
||||||
cli.parse()
|
cli.parse()
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import type { Options } from 'tsdown'
|
import type { Options } from 'tsdown'
|
||||||
import { defineConfig } from 'tsdown'
|
import { defineConfig } from 'tsdown'
|
||||||
import { version } from './package.json'
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
@ -8,8 +7,4 @@ export default defineConfig({
|
|||||||
dts: true,
|
dts: true,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
clean: true,
|
|
||||||
define: {
|
|
||||||
__CLI_VERSION__: JSON.stringify(version),
|
|
||||||
},
|
|
||||||
}) as Options
|
}) as Options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user