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

Commit 2a88ebd

Browse files
ejuorakannimer
authored andcommitted
fix(docz-core): windows shadow copy gatsby-theme (#1249)
1 parent f8c228f commit 2a88ebd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/docz-core/src/bundler/machine/actions.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ const ensureFile = (filename: string, toDelete?: string) => {
1919
}
2020

2121
export const ensureFiles = ({ args }: ServerMachineCtx) => {
22-
const appPath = paths.root
23-
const themeDirs = glob.sync(path.join(args.themesDir, '/gatsby-theme-**'), {
22+
const appPath = path.join(paths.root, args.themesDir)
23+
const themeNames = glob.sync('gatsby-theme-**', {
2424
cwd: appPath,
2525
onlyDirectories: true,
2626
})
27-
themeDirs.forEach(dir => {
28-
const chunkedPath = dir.split('/')
29-
const themeName = chunkedPath[chunkedPath.length - 1]
30-
fs.copySync(dir, path.join(paths.docz, 'src', themeName))
27+
themeNames.forEach(themeName => {
28+
fs.copySync(
29+
path.join(appPath, themeName),
30+
path.join(paths.docz, 'src', themeName)
31+
)
3132
})
3233
copyDoczRc(args.config)
3334
ensureFile('gatsby-browser.js')

0 commit comments

Comments
 (0)