Skip to content

Commit

Permalink
Add Optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dreerr committed Mar 4, 2019
1 parent 2a44db1 commit a5d8cc8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions TemplateEnginePug.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ class TemplateEnginePug extends WireData implements Module, ConfigurableModule
'template_files_suffix' => 'pug',
'api_vars_available' => 1,
'pretty' => 0,
'debug' => 0,
'debug' => 1,
'profiler' => 0,
'optimizer' => 0,
];

public function __construct()
Expand All @@ -36,7 +37,7 @@ public static function getModuleInfo()
return [
'title' => 'Template Engine Pug',
'summary' => 'Pug templates for the TemplateEngineFactory',
'version' => 201,
'version' => 203,
'author' => 'Diktus Dreibholz',
'href' => 'https://github.com/dreerr/TemplateEnginePug/',
'singular' => true,
Expand Down Expand Up @@ -115,6 +116,13 @@ public static function getModuleConfigInputfields(array $data)
$field->checked = (bool) $data['profiler'];
$wrapper->append($field);

$field = $modules->get('InputfieldCheckbox');
$field->label = __('Use Optimizer');
$field->description = __('The Optimizer is a tool that avoid to load the Phug engine if a file is available in the cache.');
$field->name = 'optimizer';
$field->checked = (bool) $data['optimizer'];
$wrapper->append($field);

return $wrapper;
}
}

0 comments on commit a5d8cc8

Please sign in to comment.