Skip to content

Commit 7229010

Browse files
authored
Merge pull request #33 from tonysm/tm/update
Updates
2 parents f619851 + bc26d1c commit 7229010

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

config/tailwindcss.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
| @see https://github.com/tailwindlabs/tailwindcss/releases to know the version availables.
4040
|
4141
*/
42-
'version' => env('TAILWINDCSS_CLI_VERSION', 'v3.4.1'),
42+
'version' => env('TAILWINDCSS_CLI_VERSION', 'v3.4.9'),
4343
];

src/Commands/BuildCommand.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Console\Command;
66
use Illuminate\Support\Facades\File;
7-
use Symfony\Component\Process\Process;
7+
use Illuminate\Support\Facades\Process;
88
use Tonysm\TailwindCss\Manifest;
99

1010
class BuildCommand extends Command
@@ -16,6 +16,7 @@ class BuildCommand extends Command
1616
{--digest : If you want the final CSS file to be generated using a digest of its contents (does not work with the --watch flag).}
1717
{--prod : This option combines the --minify and --digest options. Ideal for production.}
1818
';
19+
1920
protected $description = 'Generates a new build of Tailwind CSS for your project.';
2021

2122
public function handle()
@@ -33,7 +34,7 @@ public function handle()
3334
$sourcePath = $this->fixFilePathForOs(config('tailwindcss.build.source_file_path'));
3435
$sourceRelativePath = str_replace(rtrim(resource_path(), DIRECTORY_SEPARATOR), '', $sourcePath);
3536
$destinationPath = $this->fixFilePathForOs(config('tailwindcss.build.destination_path'));
36-
$destinationFileAbsolutePath = $destinationPath . DIRECTORY_SEPARATOR . trim($sourceRelativePath, DIRECTORY_SEPARATOR);
37+
$destinationFileAbsolutePath = $destinationPath.DIRECTORY_SEPARATOR.trim($sourceRelativePath, DIRECTORY_SEPARATOR);
3738
$destinationFileRelativePath = str_replace(rtrim(public_path(), DIRECTORY_SEPARATOR), '', $destinationFileAbsolutePath);
3839

3940
File::ensureDirectoryExists(dirname($destinationFileAbsolutePath));
@@ -46,19 +47,18 @@ public function handle()
4647
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
4748
}
4849

49-
$process = new Process(array_filter([
50-
$binFile,
51-
'-i', $sourcePath,
52-
'-o', $destinationFileAbsolutePath,
53-
$this->option('watch') ? '-w' : null,
54-
$this->shouldMinify() ? '-m' : null,
55-
]), timeout: null);
56-
$process->setWorkingDirectory(base_path());
57-
$process->setPty(true);
58-
59-
$process->run(function ($type, $buffer) {
60-
$this->output->write($buffer);
61-
});
50+
Process::forever()
51+
->tty(true)
52+
->path(base_path())
53+
->run(array_filter([
54+
$binFile,
55+
'-i', $sourcePath,
56+
'-o', $destinationFileAbsolutePath,
57+
$this->option('watch') ? '-w' : null,
58+
$this->shouldMinify() ? '-m' : null,
59+
]), function ($type, $output) {
60+
$this->output->write($output);
61+
});
6262

6363
if ($this->shouldVersion()) {
6464
$destinationFileAbsolutePath = $this->ensureAssetIsVersioned($destinationFileAbsolutePath);

src/Commands/WatchCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
class WatchCommand extends Command
88
{
99
protected $signature = 'tailwindcss:watch';
10+
1011
protected $description = 'Generates a new build of Tailwind CSS for your project, and keeps watching your files changes.';
1112

1213
public function handle()

0 commit comments

Comments
 (0)