Fix path error in generate theme variant

This commit is contained in:
Joseph Garrone 2024-05-13 23:47:28 +02:00
parent ee9df31b18
commit a9dc11c60d

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(