Skip to content

Commit 8402efe

Browse files
committed
Tweaks the install command and tailwind.config stub
1 parent bead201 commit 8402efe

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/Commands/InstallCommand.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function handle()
3939
private function ensureTailwindConfigExists()
4040
{
4141
$this->displayTask('ensuring tailwind.config.js exists', function () {
42-
$this->copyStubToAppIfMissing(
42+
$this->copyStubToApp(
4343
stub: __DIR__ . '/../../stubs/tailwind.config.js',
4444
to: base_path('tailwind.config.js'),
4545
);
@@ -70,6 +70,11 @@ private function copyStubToAppIfMissing(string $stub, string $to): void
7070
return;
7171
}
7272

73+
$this->copyStubToApp($stub, $to);
74+
}
75+
76+
private function copyStubToApp(string $stub, string $to): void
77+
{
7378
File::ensureDirectoryExists(dirname($to));
7479
File::copy($stub, $to);
7580
}
@@ -149,7 +154,7 @@ private function appendTailwindStylesToLayouts()
149154
$file,
150155
preg_replace(
151156
'/(\s*)(<\/head>)/',
152-
"\\1 <link rel=\"stylesheet\" href=\"{{ tailwindcss('css/app.css') }}\">\n\\1\\2",
157+
"\\1 <link rel=\"stylesheet\" href=\"{{ tailwindcss('css/app.css') }}\" />\\1\\2",
153158
File::get($file),
154159
),
155160
));

stubs/tailwind.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const defaultTheme = require('tailwindcss/defaultTheme')
22

3-
module.exports = {
3+
export default {
44
content: [
55
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
66
'./vendor/laravel/jetstream/**/*.blade.php',
@@ -11,7 +11,7 @@ module.exports = {
1111
theme: {
1212
extend: {
1313
fontFamily: {
14-
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
14+
sans: ['Figtree', ...defaultTheme.fontFamily.sans],
1515
},
1616
},
1717
},

0 commit comments

Comments
 (0)