public function ThemeGenerator::removeCssSourceMappingURL in AT Tools 8.2
Same name and namespace in other branches
- 8.3 at_theme_generator/src/Theme/ThemeGenerator.php \Drupal\at_theme_generator\Theme\ThemeGenerator::removeCssSourceMappingURL()
Remove CSS source mapping URLs in CSS files.
1 call to ThemeGenerator::removeCssSourceMappingURL()
- ThemeGeneratorTypes::starterkitGenerator in at_theme_generator/
src/ Theme/ ThemeGeneratorTypes.php - Generate starter kit type theme.
File
- at_theme_generator/
src/ Theme/ ThemeGenerator.php, line 459
Class
- ThemeGenerator
- Generator form.
Namespace
Drupal\at_theme_generator\ThemeCode
public function removeCssSourceMappingURL() {
$component_css_files = $this
->getComponentCssFiles();
$component_css_files_path = $this->target . '/styles/css/components/';
foreach ($component_css_files as $component_file_key => $component_file) {
$map_string = '/*# sourceMappingURL=' . str_replace('.css', '.css.map', $component_file) . ' */';
if (file_exists($component_css_files_path . '/' . $component_file)) {
$this->fileOperations
->fileStrReplace($component_css_files_path . '/' . $component_file, $map_string, '');
}
}
}