Skip to content

Commit

Permalink
fixed generation of index.js files for blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDosin committed Jun 28, 2021
1 parent bc2f4d0 commit 1639617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Command/GenerateCmsBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private function buildCmsBlock(string $blockName, string $pluginName, string $bl
}

if (strpos($file->getFilename(), 'index')) {
file_put_contents($blockFolderPath . '/' . $type . '/sw-cms-block-'. $type . '-' . $blockName .'.js', $fileContent);
file_put_contents($blockFolderPath . '/' . $type . '/index.js', $fileContent);
}
}
}
Expand Down Expand Up @@ -181,7 +181,7 @@ public function buildStorefrontBlock(string $blockName, string $pluginName, stri
}

// Move the generated file to the correct folder path
file_put_contents($templateFolderPath . '/cms-block-' . $blockCategory . '-' . $blockName . '.html.twig', $storefrontTemplate);
file_put_contents($templateFolderPath . '/cms-block-' . $blockName . '.html.twig', $storefrontTemplate);
}

/**
Expand Down

0 comments on commit 1639617

Please sign in to comment.