@@ -154,56 +154,15 @@ protected function installNpmDependencies(Filesystem $filesystem, PackageManifes
154
154
*/
155
155
protected function enablesVueDevTool (Filesystem $ filesystem , PackageManifest $ manifest ): int
156
156
{
157
- $ novaVendorPath = join_paths ($ manifest ->vendorPath , 'laravel ' , 'nova ' );
158
-
159
- $ publicPath = join_paths ($ novaVendorPath , 'public ' );
160
- $ publicCachePath = join_paths ($ novaVendorPath , 'public-cached ' );
161
- $ webpackFile = join_paths ($ novaVendorPath , 'webpack.mix.js ' );
162
-
163
- if (! $ filesystem ->isDirectory ($ publicCachePath )) {
164
- $ filesystem ->makeDirectory ($ publicCachePath );
165
-
166
- $ filesystem ->copyDirectory ($ publicPath , $ publicCachePath );
167
- $ filesystem ->put (join_paths ($ publicCachePath , '.gitignore ' ), '* ' );
168
- }
169
-
170
- if (! $ filesystem ->isFile ($ webpackFile )) {
171
- $ filesystem ->copy ("{$ webpackFile }.dist " , $ webpackFile );
172
- }
173
-
174
- $ this ->executeCommand (['npm set progress=false ' , 'npm ci ' ], $ novaVendorPath );
175
- $ filesystem ->put (join_paths ($ novaVendorPath , 'node_modules ' , '.gitignore ' ), '* ' );
176
-
177
- $ this ->executeCommand (['npm set progress=false ' , 'npm run dev ' ], $ novaVendorPath );
178
-
179
- $ this ->call ('vendor:publish ' , ['--tag ' => 'nova-assets ' , '--force ' => true ]);
180
-
181
- return self ::SUCCESS ;
157
+ return $ this ->call ('nova:enable-vue-devtool ' , ['--force ' => true ]);
182
158
}
183
159
184
160
/**
185
161
* Disables Vue DevTool.
186
162
*/
187
163
protected function disablesVueDevTool (Filesystem $ filesystem , PackageManifest $ manifest ): int
188
164
{
189
- $ novaVendorPath = join_paths ($ manifest ->vendorPath , 'laravel ' , 'nova ' );
190
-
191
- $ publicPath = join_paths ($ novaVendorPath , 'public ' );
192
- $ publicCachePath = join_paths ($ novaVendorPath , 'public-cached ' );
193
-
194
- if ($ filesystem ->isDirectory ($ publicCachePath )) {
195
- if ($ filesystem ->isDirectory ($ publicPath )) {
196
- $ filesystem ->deleteDirectory ($ publicPath );
197
- }
198
-
199
- $ filesystem ->delete (join_paths ($ publicCachePath , '.gitignore ' ));
200
- $ filesystem ->copyDirectory ($ publicCachePath , $ publicPath );
201
- $ filesystem ->deleteDirectory ($ publicCachePath );
202
- }
203
-
204
- $ this ->call ('vendor:publish ' , ['--tag ' => 'nova-assets ' , '--force ' => true ]);
205
-
206
- return self ::SUCCESS ;
165
+ return $ this ->call ('nova:disable-vue-devtool ' , ['--force ' => true ]);
207
166
}
208
167
209
168
/**
0 commit comments