src/Compilers/Base.php
public function compile(): string
    {
        if ($this->doWeNeedToMinify($this->file))
        {
            $src = $this->getMinifier($this->file, $this->source)->minify();

            // Remove any source mappings, they cause 404 errors.
            // One of the benefits of using this Robo Task is that it is super
            // easy to switch between a minifed asset and a non minified asset.
            $src = preg_replace('/^\/\/# sourceMappingURL.*$/m', '', $src);

            // TODO: generate our own source maps... sounds like a challenge :)
        }
        else
        {
            $src = $this->source;
        }

        return $src."\n\n";
    }
public function compile(): string
    {
        if ($this->doWeNeedToMinify($this->file))
        {
            $src = $this->getMinifier($this->file, $this->source)->minify();

            // Remove any source mappings, they cause 404 errors.
            // One of the benefits of using this Robo Task is that it is super
            // easy to switch between a minifed asset and a non minified asset.
            $src = preg_replace('/^\/\/# sourceMappingURL.*$/m', '', $src);

            // TODO: generate our own source maps... sounds like a challenge :)
        }
        else
        {
            $src = $this->source;
        }

        return $src."\n\n";
    }
public function compile ( ) : string { if ( $ this -> doWeNeedToMinify ( $ this -> file ) ) { $ src = $ this -> getMinifier ( $ this -> file , $ this -> source ) -> minify ( ) ; // Remove any source mappings, they cause 404 errors. // One of the benefits of using this Robo Task is that it is super // easy to switch between a minifed asset and a non minified asset. $ src = preg_replace ( '/^\/\/# sourceMappingURL.*$/m' , '' , $ src ) ; // TODO: generate our own source maps... sounds like a challenge :) } else { $ src = $ this -> source ; } return $ src . "\n\n" ; }
@inheritDoc

This implementation caters for both standard native Css and Js files
that don't need any compiling as such. The less and sass compilers
extend the css compiler.
@inheritDoc