Skip to content

Commit

Permalink
🐛 no more compile in precompile
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Mar 19, 2020
1 parent 92dba4b commit 42bbcde
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 1,057 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/vendor/**/.*
/vendor/**/*.json
/vendor/**/*.txt
/vendor/**/*.md``
/vendor/**/*.md
/vendor/**/*.yml
/vendor/**/*.yaml
/vendor/**/*.xml
Expand Down
6 changes: 5 additions & 1 deletion classes/LncFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ public function precompiledTemplate($name): string
{
foreach ($this->files as $lncFile) {
if ($lncFile->partial() === false && $lncFile->name() === $name) {
return $lncFile->php() ?? $this->compile($lncFile);
$php = $lncFile->php();
if (! $php) {
$php = $this->compile($lncFile);
}
return $php;
}
}
return $this->precompiledTemplate('default');
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.3.3",
"version": "3.3.4",
"license": "MIT",
"description": "Kirby 3 Component for semantic templates with Handlebars and Mustache",
"authors": [
Expand Down
96 changes: 48 additions & 48 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 42bbcde

Please sign in to comment.