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

Commit 37b73c6

Browse files
committed
fix(gatsby-theme-docz): use createPages instead of createPagesStatefully
1 parent cd4750b commit 37b73c6

File tree

4 files changed

+2
-78
lines changed

4 files changed

+2
-78
lines changed

core/docz-core/src/states/props.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import chokidar from 'chokidar'
33
import fastglob from 'fast-glob'
44
import { State, Params } from '../lib/DataServer'
55
import { flatten, get } from 'lodash/fp'
6-
import { Signale } from 'signale'
76

87
import * as paths from '../config/paths'
98
import { Config } from '../config/argv'
@@ -26,9 +25,7 @@ export const mapToArray = (map: any = []) =>
2625
const initial = (config: Config) => async (p: Params) => {
2726
const pattern = getPattern(config)
2827
const files = await fastglob<string>(pattern, { cwd: paths.root })
29-
console.time('initial')
3028
const metadata = await docgen(files, config)
31-
console.timeEnd('initial')
3229
p.setState('props', flatten(mapToArray(metadata)))
3330
}
3431

@@ -61,14 +58,8 @@ export const state = (config: Config): State => {
6158
return {
6259
id: 'props',
6360
start: async params => {
64-
const interactive = new Signale({ interactive: true, scope: 'props' })
65-
interactive.await(
66-
'Parsing initial props from your components (this could take a while)'
67-
)
6861
const addInitial = initial(config)
6962
await addInitial(params)
70-
interactive.success('Props parsed successfuly')
71-
7263
watcher.on('change', add(params, config))
7364
watcher.on('unlink', remove(params))
7465
},

core/gatsby-theme-docz/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exports.createPagesStatefully = require('./src/node/createPagesStatefully')
1+
exports.createPages = require('./src/node/createPages')
22
exports.onCreateBabelConfig = require('./src/node/onCreateBabelConfig')
33
exports.onPreInit = require('./src/node/onPreInit')
44
exports.sourceNodes = require('./src/node/sourceNodes')

core/gatsby-theme-docz/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// noop

core/gatsby-theme-docz/src/node/createPagesStatefully.js

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)