Skip to content

Commit

Permalink
feat(docz-core): introduce gatsbyRoot to use for fs sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Dec 17, 2019
1 parent c18749f commit 8e89d64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/docz-core/src/config/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface Argv {
root: string
base: string
src: string
gatsbyRoot: string | string[]
files: string | string[]
ignore: any[]
watchIgnore: string
Expand Down Expand Up @@ -94,7 +95,11 @@ export const setArgs = (yargs: Yargs) => {
.option('source', {
alias: 'src',
type: 'string',
default: getEnv('docz.source', './'),
default: getEnv('docz.source', doczRcBaseConfig.src),
})
.option('gatsbyRoot', {
type: 'string',
default: getEnv('docz.gatsbyRoot', doczRcBaseConfig.gatsbyRoot),
})
.option('files', {
type: 'string',
Expand Down
2 changes: 2 additions & 0 deletions core/docz-core/src/config/docz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const toOmit = ['_', '$0', 'version', 'help']
export const doczRcBaseConfig = {
typescript: fs.existsSync(paths.appTsConfig),
themeConfig: {},
src: './',
gatsbyRoot: './',
themesDir: 'src',
mdxExtensions: ['.md', '.mdx'],
docgenConfig: {},
Expand Down

0 comments on commit 8e89d64

Please sign in to comment.