Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 793b5ce

Browse files
committed
chore(docz-core): add some missing pieces from prs
1 parent 4af7376 commit 793b5ce

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

core/docz-core/src/config/argv.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface Argv {
5555
/* io args */
5656
base: string
5757
src: string
58-
files: string
58+
files: string | string[]
5959
ignore: string[]
6060
public: string
6161
dest: string
@@ -84,6 +84,8 @@ export interface Argv {
8484
hashRouter: boolean
8585
wrapper?: string
8686
indexHtml?: string
87+
/** slugify separator */
88+
separator: string
8789
}
8890

8991
export interface Config extends Argv {
@@ -115,7 +117,7 @@ export const setArgs = (yargs: Yargs) => {
115117
})
116118
.option('files', {
117119
type: 'string',
118-
default: getEnv('docz.files', '**/*.mdx'),
120+
default: getEnv('docz.files', '**/*.{md,markdown,mdx}'),
119121
})
120122
.option('ignore', {
121123
type: 'array',
@@ -209,4 +211,8 @@ export const setArgs = (yargs: Yargs) => {
209211
type: 'boolean',
210212
default: getEnv('docz.sourcemaps', true),
211213
})
214+
.option('separator', {
215+
type: 'string',
216+
default: getEnv('docz.separator', '-'),
217+
})
212218
}

core/docz-core/src/lib/Entry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
} from 'docz-utils/lib/mdast'
1111

1212
import * as paths from '../config/paths'
13-
14-
import { Config } from './commands/args'
13+
import { Config } from '../config/argv'
1514

1615
const createId = (file: string) =>
1716
crypto

0 commit comments

Comments
 (0)