Pipe\Compressor\UglifyJs::render PHP Метод

render() публичный Метод

public render ( $context = null, $vars = [] )
    function render($context = null, $vars = array())
    {
        $cmd = "/usr/bin/env uglifyjs";
        $process = new Process($cmd);
        $process->setStdin($this->data);
        $process->run();
        if (!$process->isSuccessful()) {
            throw new \Exception("uglifyjs exited with an error: {$process->getErrorOutput()}");
        }
        return $process->getOutput();
    }