for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Badworks\TailwindPreset;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\Console\PresetCommand;
class TailwindServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*/
public function boot()
PresetCommand::macro('tailwind', function ($command) {
if ($command->confirm('This action will overwrite your existing views and assets, are you sure you want to proceed?', true)) {
Tailwind::install();
$this->installMessage($command);
}
});
* Print message after successful installation.
*
* @param \Illuminate\Console\Command $command
protected function installMessage($command)
$command->info('Tailwind scaffolding installed successfully.');
$command->comment('Please run "npm install && npx tailwind init && npm run dev" to compile your fresh scaffolding.');