Skip to content

Commit

Permalink
✨ use kirby cache root to store compiled hbs files
Browse files Browse the repository at this point in the history
closes #12

Signed-off-by: Bruno Meilick <[email protected]>
  • Loading branch information
bnomei committed Feb 12, 2022
1 parent 11f7b49 commit 3207bbe
Show file tree
Hide file tree
Showing 7 changed files with 794 additions and 972 deletions.
16 changes: 1 addition & 15 deletions classes/LncFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,21 +345,7 @@ public function precompiledTemplate($name): string
*/
public function lncCacheRoot(): string
{
// TODO: https://github.com/getkirby/ideas/issues/390
$path = implode([
kirby()->roots()->cache(),
DIRECTORY_SEPARATOR,
'plugins',
DIRECTORY_SEPARATOR,
'bnomei',
DIRECTORY_SEPARATOR,
'handlebars',
DIRECTORY_SEPARATOR,
$this->option('extension-output'),
]);
Dir::make($path);

return $path;
return kirby()->cache('bnomei.handlebars')->root();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-handlebars",
"type": "kirby-plugin",
"version": "3.4.7",
"version": "3.5.0",
"license": "MIT",
"description": "Kirby 3 Component for semantic templates with Handlebars and Mustache",
"authors": [
Expand Down
Loading

0 comments on commit 3207bbe

Please sign in to comment.