diff --git a/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm b/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm index 47e16be..7ce89de 100644 --- a/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm +++ b/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm @@ -61,9 +61,15 @@ sub process { $asset->content($store->save(\$css, $attrs))->FROM_JSON($attrs); } else { - my @args = (qw(sass -s), map { ('-I', $_) } @{$opts{include_paths}}); - push @args, '--scss' if $asset->format eq 'scss'; - push @args, qw(-t compressed) if $attrs->{minified}; + my @args; + if ($ENV{MOJO_PLUGIN_ASSETPACK_SASSC}) { + @args = (qw(sassc -s), map { ('-I', $_) } @{$opts{include_paths}}); + } + else { + @args = (qw(sass -s --trace), map { ('-I', $_) } @{$opts{include_paths}}); + push @args, '--scss' if $asset->format eq 'scss'; + push @args, qw(-t compressed) if $attrs->{minified}; + } $self->run(\@args, \$content, \my $css, undef); $asset->content($store->save(\$css, $attrs))->FROM_JSON($attrs); }