Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 16, 2023
1 parent dcc3f9f commit 1965e32
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,19 @@ protected function replaceInFile($search, $replace, $path)
file_put_contents($path, str_replace($search, $replace, file_get_contents($path)));
}

/**
* Remove Tailwind dark classes from the given files.
*
* @param \Symfony\Component\Finder\Finder $finder
* @return void
*/
protected function removeDarkClasses(Finder $finder)
{
foreach ($finder as $file) {
file_put_contents($file->getPathname(), preg_replace('/\sdark:[^\s"\']+/', '', $file->getContents()));
}
}

/**
* Get the path to the appropriate PHP binary.
*
Expand Down Expand Up @@ -796,17 +809,4 @@ protected function runCommands($commands)
$this->output->write(' '.$line);
});
}

/**
* Remove Tailwind dark classes from the given files.
*
* @param \Symfony\Component\Finder\Finder $finder
* @return void
*/
protected function removeDarkClasses(Finder $finder)
{
foreach ($finder as $file) {
file_put_contents($file->getPathname(), preg_replace('/\sdark:[^\s"\']+/', '', $file->getContents()));
}
}
}

0 comments on commit 1965e32

Please sign in to comment.