Skip to content

Commit 799bd92

Browse files
committed
docs: Fix non-replaced {{version}} in CLI reference
1 parent d7cc8dc commit 799bd92

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/.vitepress/loaders/cli.data.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import consola from 'consola';
22
import spawn from 'nano-spawn';
33
import { resolve } from 'node:path';
4+
import { version } from '../../../packages/wxt/package.json';
45

56
const cliDir = resolve('packages/wxt/src/cli/commands');
67
const cliDirGlob = resolve(cliDir, '**');
@@ -44,12 +45,12 @@ async function getHelp(command: string): Promise<string> {
4445
return result.stdout;
4546
}
4647

47-
function getWxtHelp(command: string): Promise<string> {
48-
return getHelp(`bun run --silent wxt ${command}`.trim());
48+
async function getWxtHelp(command: string): Promise<string> {
49+
const res = await getHelp(`bun run --silent wxt ${command}`.trim());
50+
return res.replaceAll('{{version}}', version);
4951
}
5052

5153
async function getPublishExtensionHelp(command: string): Promise<string> {
52-
// console.error('\n\n\n', await fs.readdir('.'));
5354
const res = await getHelp(
5455
`bun run --silent publish-extension ${command}`.trim(),
5556
);

0 commit comments

Comments
 (0)