Open eddysims opened 4 years ago
Hey, our monorepo looks something like this
├── packages
│ ├── app
│ ├── components
│ ├── docz
And the doczrc.js
file looks as follows
export default {
...,
files: ['../components/src/**/*.{md,markdown,mdx}'],
docgenConfig: {
searchPatterns: ['../components/src/**/*.{ts,tsx,js}'],
},
The docgenConfig
entry is for the <Props/>
Components so it finds the corresponding files.
@Fruitseller if your monorepo looked like this
├── packages
│ ├── app
│ ├── components
│ ├── docz-theme
│ ├── docz
README.md
Are you able to get the README.md
working? That is the issue im having. When i do something like this
files: ['../../README.md']
docz just continues to build over and over.
also using a monorepo...
docz just continues to build over and over.
this is the issue I am trying to solve. when running docz dev
I get a continual build that loops over this about every 3 seconds:
[docz] success Checking for changed pages - 0.000s
[docz] success update schema - 0.014s
[docz] success onPreExtractQueries - 0.001s
[docz] success extract queries from components - 0.012s
[docz] success write out requires - 0.001s
[docz] success building schema - 0.127s
[docz] success createPages - 0.001s
@jasongaare something that i think worked. I haven't fully tested it yet is moving my .md
files into a docs
directory at the root. My repo now looks something like this
├── packages
│ ├── app
│ ├── components
│ ├── docz-theme
│ ├── docz
├── docs
│ ├──README.md
and my doczrc.js
looks something like this
{
...,
files: [
...,
'../../docs/**/*.{md,mdx}'
]
}
Github will also allow this.
I think my issue is re: docgenConfig.searchPaths
// doczrc.js
export default {
docgenConfig: {
searchPatterns: [
"../src/{mobile,shared}/**/*.{js,jsx}",
"!**/node_modules",
"!**/doczrc.js",
],
},
};
when I comment out the searchPatterns
then gatsby does not continually build, but as was mentioned about without that then the
The docgenConfig entry is for the
Components so it finds the corresponding files.
I have the same issue as @jasongaare.
Props
componentdocgenConfig.searchPatterns
to .docz.js
with the path to my components makes props show upThis just loops and never stops
success building schema - 0.324s
success createPages - 0.033s
success Checking for changed pages - 0.009s
success update schema - 0.035s
success onPreExtractQueries - 0.005s
success extract queries from components - 0.038s
success write out requires - 0.006s
Using Docz 2.3.1
and NOT using TypeScript for any files. The docs kinda give the impression the props display only works if you're using TypeScript but not sure that is the case.
@sheedy Im still getting the same issue, have you found any solution to this yet?
@Fruitseller if your monorepo looked like this
├── packages │ ├── app │ ├── components │ ├── docz-theme │ ├── docz README.md
Are you able to get the
README.md
working? That is the issue im having. When i do something like thisfiles: ['../../README.md']
docz just continues to build over and over.
Sorry for not responding. We do not have a root level README file so I can't help you with that.
Bug Report
I have a monorepo set up and I would like to have docz get mdx files from the packages inside of it.
packages/
components/
mdx
files.design/
mdx
files.hooks
mdx
files.docz-theme/
docz
.doczrc.js
README.md
(Index page for docz viewer).doczrc
When running
docz dev
the build freezes and will not finish.To Reproduce
This issue can be easily reproduced by using the monorepo example.
npx create-docz-app docz-app-monorepo-separate-docs --example monorepo-separate-docs
add to
packages/docs/doczrc.js