protected function getJsContent(string $file, bool $minify): string
    {
        $content = file_get_contents($file);

        if ($content === false) {
            throw new RuntimeException(sprintf('File could be read: %s', $file));
        }

        if ($minify) {
            $content = JSMin::minify($content);
        }

        return $content;
    }