@@ -56,16 +56,24 @@ public function handle(Filesystem $filesystem, PackageManifest $manifest): int
56
56
*/
57
57
protected function installNovaWorkbench (Filesystem $ filesystem , PackageManifest $ manifest ): int
58
58
{
59
- $ this ->executeCommand ([
60
- 'npm set progress=false ' ,
61
- 'npm install --save-dev "vendor/laravel/nova-devtool" ' ,
62
- ], package_path ());
59
+ $ this ->installNoveDevtoolNpmDependencies ();
63
60
64
61
return $ this ->call ('workbench:install ' , [
65
62
'--devtool ' => true ,
66
63
]);
67
64
}
68
65
66
+ /**
67
+ * Install `laravel-nova-devtool` to `package.json`.
68
+ */
69
+ protected function installNoveDevtoolNpmDependencies (): void
70
+ {
71
+ $ this ->executeCommand ([
72
+ 'npm set progress=false ' ,
73
+ 'npm install --save-dev "vendor/laravel/nova-devtool" ' ,
74
+ ], package_path ());
75
+ }
76
+
69
77
/**
70
78
* Install `tsconfig.json` configuration.
71
79
*/
@@ -116,9 +124,11 @@ protected function installNpmDependencies(Filesystem $filesystem, PackageManifes
116
124
return self ::SUCCESS ;
117
125
}
118
126
127
+ $ this ->installNoveDevtoolNpmDependencies ();
128
+
119
129
$ this ->executeCommand ([
120
130
'npm set progress=false ' ,
121
- 'npm install --dev ' .implode (' ' , $ dependencies ),
131
+ 'npm install --save- dev ' .implode (' ' , $ dependencies ),
122
132
], package_path ());
123
133
124
134
if (in_array ('tailwindcss ' , $ dependencies )) {
@@ -206,7 +216,7 @@ protected function promptForMissingArgumentsUsing(): array
206
216
'install ' => 'Install NPM Dependencies ' ,
207
217
'enable-vue-devtool ' => 'Enable Vue DevTool ' ,
208
218
'disable-vue-devtool ' => 'Disable Vue DevTool ' ,
209
- 'tsconfig ' => 'Install `tsconfig.json` for Nova ' ,
219
+ 'tsconfig ' => is_file ( package_path ( ' tsconfig.json ' )) ? null : 'Install `tsconfig.json` for Nova ' ,
210
220
]),
211
221
default: 'owner '
212
222
),
0 commit comments