protected function getScripts($package, $current = null)
{
if (!($scripts = $package->get('extra.scripts'))) {
return new PackageScripts(null, $current);
}
if (!($path = $package->get('path'))) {
throw new \RuntimeException(__('Package path is missing.'));
}
return new PackageScripts($path . '/' . $scripts, $current);
}