Skip to content
Snippets Groups Projects
Commit 90e42946 authored by jurgenhaas's avatar jurgenhaas
Browse files

#7 Support twig file extension

parent 48c0100f
No related branches found
No related tags found
No related merge requests found
......@@ -210,13 +210,16 @@ class Handler
}
protected function tweaks($string) {
$string = str_replace('THEMENAME', '{{ project_name }}', $string);
$baseTheme = $this->getOption('base_theme');
if (isset($baseTheme['sasspath'])) {
if (strpos($string, $baseTheme['sasspath']) === 0) {
$string = 'sass' . substr($string, strlen($baseTheme['sasspath']));
}
}
return $string;
}
......@@ -296,6 +299,9 @@ class Handler
// Determine relative filename of destination
$relFilename = $file->getRelativePathname();
if ($file->getExtension() == 'twig') {
$relFilename = substr($relFilename, 0, strrpos($relFilename, '.twig'));
}
$tweakedRelFilename = $this->tweaks($relFilename);
$filename = $destination . DIRECTORY_SEPARATOR . $this->twig($relFilename);
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment