Skip to content

Commit dd8bb51

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 5a361d3 commit dd8bb51

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

bin/sync

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,37 @@ transform([
7777
"
7878
], fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/stubs/NovaServiceProvider.stub"));
7979

80-
Symfony\Component\Process\Process::fromShellCommandline(
81-
'npx -p typescript tsc', $workingPath
82-
)->mustRun();
80+
if (! $files->isFile("{$workingPath}/vendor/laravel/nova/webpack.mix.js")) {
81+
$files->copy("{$workingPath}/vendor/laravel/nova/webpack.mix.js.dist", "{$workingPath}/vendor/laravel/nova/webpack.mix.js");
82+
}
83+
84+
Illuminate\Support\Collection::make([
85+
'npm ci',
86+
'npm run prod',
87+
])->each(function ($command) use ($workingPath) {
88+
tap(
89+
Symfony\Component\Process\Process::fromShellCommandline($command, "{$workingPath}/vendor/laravel/nova"),
90+
function ($process) {
91+
$process->setTty(true);
92+
$process->setTimeout(3600);
93+
$process->mustRun();
94+
}
95+
);
96+
});
97+
98+
Illuminate\Support\Collection::make([
99+
'npm ci',
100+
'npx -p typescript tsc',
101+
])->each(function ($command) use ($workingPath) {
102+
tap(
103+
Symfony\Component\Process\Process::fromShellCommandline($command, $workingPath),
104+
function ($process) {
105+
$process->setTty(true);
106+
$process->setTimeout(3600);
107+
$process->mustRun();
108+
}
109+
);
110+
});
83111

84112
$files->ensureDirectoryExists("{$workingPath}/types/@types/laravel-nova-ui");
85113

@@ -89,4 +117,4 @@ Illuminate\Support\Collection::make([
89117
->filter(fn ($file) => is_file($file))
90118
->each(function ($file) use ($files, $workingPath) {
91119
$files->copy($file, "{$workingPath}/types/@types/laravel-nova-ui".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/laravel/nova/resources/types/components"));
92-
});
120+
});

types/@types/laravel-nova-ui/Button.vue.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ declare const _default: import("vue").DefineComponent<{
5858
trailingIcon: {};
5959
}>>, {
6060
size: string;
61-
variant: string;
6261
disabled: boolean;
62+
variant: string;
6363
as: string;
6464
state: string;
6565
padding: string;

0 commit comments

Comments
 (0)