File tree 4 files changed +21
-12
lines changed
packages/@vuepress/cli/src/commands
4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,10 @@ import {
8
8
transformUserConfigToPlugin ,
9
9
} from '../../config'
10
10
import { resolveBuildAppConfig } from './resolveBuildAppConfig'
11
- import type { BuildCommandOptions } from './types'
11
+ import type { BuildCommand } from './types'
12
12
13
13
const log = debug ( 'vuepress:cli/build' )
14
14
15
- export type BuildCommand = (
16
- sourceDir ?: string ,
17
- commandOptions ?: BuildCommandOptions
18
- ) => Promise < void >
19
-
20
15
export const createBuild = (
21
16
defaultAppConfig : Partial < AppConfig >
22
17
) : BuildCommand => async (
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Type of `dev` command function
3
+ */
4
+ export type BuildCommand = (
5
+ sourceDir ?: string ,
6
+ commandOptions ?: BuildCommandOptions
7
+ ) => Promise < void >
8
+
9
+ /**
10
+ * CLI options of `build` command
11
+ */
1
12
export interface BuildCommandOptions {
2
13
// app config
3
14
dest ?: string
Original file line number Diff line number Diff line change @@ -9,17 +9,12 @@ import {
9
9
} from '../../config'
10
10
import { resolveDevAppConfig } from './resolveDevAppConfig'
11
11
import { resolveDevUserConfig } from './resolveDevUserConfig'
12
- import type { DevCommandOptions } from './types'
12
+ import type { DevCommand } from './types'
13
13
import { watchPageFiles } from './watchPageFiles'
14
14
import { watchUserConfigFile } from './watchUserConfigFile'
15
15
16
16
const log = debug ( 'vuepress:cli/dev' )
17
17
18
- export type DevCommand = (
19
- sourceDir ?: string ,
20
- commandOptions ?: DevCommandOptions
21
- ) => Promise < void >
22
-
23
18
export const createDev = ( defaultAppConfig : Partial < AppConfig > ) : DevCommand => {
24
19
const dev : DevCommand = async (
25
20
sourceDir = '.' ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Type of `dev` command function
3
+ */
4
+ export type DevCommand = (
5
+ sourceDir ?: string ,
6
+ commandOptions ?: DevCommandOptions
7
+ ) => Promise < void >
8
+
1
9
/**
2
10
* CLI options of `dev` command
3
11
*/
You can’t perform that action at this time.
0 commit comments