Same name in other branches
- 5.0.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::js()
- 8.x-3.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::js()
- 8.x-4.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::js()
Minify Javascript using via command line.
Paramètres
string $contents: The JavaScript to minify.
Return value
string|bool The process JavaScript or FALSE on failure.
Fichier
-
advagg_ext_minify/
src/ Asset/ Minifier.php, line 85
Classe
- Minifier
- Optimizes a asset via external minifiers.
Namespace
Drupal\advagg_ext_minify\AssetCode
public function js($contents) {
file_put_contents($this->in, $contents);
$output = $this->execute('js');
$contents = file_get_contents($output);
return $contents;
}