Fix path error in generate theme variant

This commit is contained in:
Joseph Garrone
2024-05-13 23:47:28 +02:00
parent f9fc0cda95
commit 699a3c8bf6

View File

@ -10,7 +10,7 @@ export function generateThemeVariations(params: { themeName: string; themeVarian
transformCodebase({ transformCodebase({
"srcDirPath": mainThemeDirPath, "srcDirPath": mainThemeDirPath,
"destDirPath": pathJoin(mainThemeDirPath, themeVariantName), "destDirPath": pathJoin(mainThemeDirPath, "..", themeVariantName),
"transformSourceCode": ({ fileRelativePath, sourceCode }) => { "transformSourceCode": ({ fileRelativePath, sourceCode }) => {
if (pathExtname(fileRelativePath) === ".ftl" && fileRelativePath.split(pathSep).length === 2) { if (pathExtname(fileRelativePath) === ".ftl" && fileRelativePath.split(pathSep).length === 2) {
const modifiedSourceCode = Buffer.from( const modifiedSourceCode = Buffer.from(