|
|
|
@ -40,7 +40,7 @@ class ScssphpCompile extends Command {
|
|
|
|
|
$contenu = false;
|
|
|
|
|
if (!lire_fichier($fichier, $contenu)) {
|
|
|
|
|
$output->writeln("Fichier $fichier introuvable");
|
|
|
|
|
exit(1);
|
|
|
|
|
return Command::FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// compiler le SCSS si besoin (ne pas generer une erreur si source vide
|
|
|
|
@ -53,7 +53,7 @@ class ScssphpCompile extends Command {
|
|
|
|
|
}
|
|
|
|
|
catch (Exception $e) {
|
|
|
|
|
$output->writeln("<error>".$e->getMessage()."</error>");
|
|
|
|
|
exit(1);
|
|
|
|
|
return Command::FAILURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -70,7 +70,7 @@ class ScssphpCompile extends Command {
|
|
|
|
|
or !$json = file_get_contents($tache)
|
|
|
|
|
or !$json = json_decode($json, true) ) {
|
|
|
|
|
$output->writeln("<error>Indiquez un fichier json valide pour `--tache={$tache}`</error>");
|
|
|
|
|
exit(1);
|
|
|
|
|
return Command::FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$args = [
|
|
|
|
@ -86,10 +86,12 @@ class ScssphpCompile extends Command {
|
|
|
|
|
list($out, $error) = scssphp_inline_compile($args['style'], $args['contexte'], $args['cache_options'], $args['import_dirs'], $args['scss_vars']);
|
|
|
|
|
if ($error) {
|
|
|
|
|
$output->writeln($error);
|
|
|
|
|
exit(1);
|
|
|
|
|
return Command::FAILURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo $out;
|
|
|
|
|
|
|
|
|
|
return Command::SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
}
|