File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/Console/InstallerTraits Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ protected function installFrontendPackages(): void
5151
5252 ] + $ packages );
5353
54+ $ this ->removeDefaultTailwindConfig ();
55+
5456 // Config files...
5557 copy (__DIR__ .'/../../../stubs/stack-configs/postcss.config.cjs ' , base_path ('postcss.config.cjs ' ));
5658 copy (__DIR__ .'/../../../stubs/stack-configs/tailwind.config.cjs ' , base_path ('tailwind.config.cjs ' ));
@@ -106,4 +108,20 @@ protected function runCommands(array $commands): void
106108 $ this ->output ->write (' ' .$ line );
107109 });
108110 }
111+
112+ protected function removeDefaultTailwindConfig (): void
113+ {
114+ $ tailwindConfigPath = base_path ('tailwind.config.js ' );
115+
116+ if (! file_exists ($ tailwindConfigPath )) {
117+ return ;
118+ }
119+
120+ try {
121+ unlink ($ tailwindConfigPath );
122+ $ this ->info ('Default tailwind.config.js removed. ' );
123+ } catch (\Exception $ e ) {
124+ $ this ->error ('Unable to remove default tailwind.config.js. Please check file permissions. ' );
125+ }
126+ }
109127}
You can’t perform that action at this time.
0 commit comments