protected function _findFile($filename, $path = null)
{
if (substr($filename, -2) !== 'js') {
$filename .= '.js';
}
if ($path && file_exists($path . $filename)) {
return $path . $filename;
}
$file = $this->_scanner()->find($filename);
if ($file) {
return $file;
}
throw new \Exception('Sprockets - Could not locate file "' . $filename . '"');
}