public function make($path, $name, array $options = [])
{
$options += ['filter' => null, 'prefix' => null];
$this->parsedRoutes = $this->getParsedRoutes($options['filter'], $options['prefix']);
$template = $this->file->get(__DIR__ . '/templates/Router.js');
$template = str_replace("routes: null,", 'routes: ' . json_encode($this->parsedRoutes) . ',', $template);
$template = str_replace("'Router'", "'" . $options['object'] . "'", $template);
if ($this->file->isWritable($path)) {
$filename = $path . '/' . $name;
return $this->file->put($filename, $template) !== false;
}
return false;
}