Skip to content

Commit 3295f06

Browse files
authored
Merge pull request #33 from hotwired-laravel/tm/remove-hello-controller
Remove example hello controller
2 parents ff70fdd + df59fb1 commit 3295f06

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ php artisan stimulus:install
3636

3737
That's it. The install command will automatically detect if you're using [Importmap Laravel](https://github.com/tonysm/importmap-laravel) or [Vite](https://vitejs.dev/) to manage your JavaScript dependencies. If you're using Importmap Laravel, we're pinning the Stimulus dependency and publishing a local dependency to your `public/vendor` folder and pinning it so you don't have to register Stimulus controllers. If you're using Vite, we'll add the Stimulus dependecy to your `package.json`.
3838

39-
The install command generates a `resources/js/libs/stimulus.js` file that installs Stimulus. It also creates your first Stimulus controller at `resources/js/libs/controllers/hello_controller.js`. It will also create a `resources/js/libs/index.js` that ensures the `resources/js/controllers/index.js` module is imported.
39+
The install command generates a `resources/js/libs/stimulus.js` file that installs Stimulus. It will also create a `resources/js/libs/index.js` that ensures the `resources/js/controllers/index.js` module is imported.
4040

4141
When using Importmap Laravel, the `resources/js/controllers/index.js` will use the published `stimulus-loading` dependency to either eager load or lazy load your Stimulus controller registrations automatically, so you don't have to manually register them. When using Vite, that file will be auto-generated whenever you make a new Stimulus controller or whenever you run the `php artisan stimulus:manifest` manually.
4242

src/Commands/Concerns/InstallsForImportmap.php

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ protected function publishJsFilesForImportmaps()
2222
File::ensureDirectoryExists(resource_path('js/libs'));
2323

2424
File::copy(__DIR__.'/../../../stubs/resources/js/libs/stimulus.js', resource_path('js/libs/stimulus.js'));
25-
File::copy(__DIR__.'/../../../stubs/resources/js/controllers/hello_controller.js', resource_path('js/controllers/hello_controller.js'));
2625
File::copy(__DIR__.'/../../../stubs/resources/js/controllers/index-importmap.js', resource_path('js/controllers/index.js'));
2726

2827
$libsIndexFile = resource_path('js/libs/index.js');

src/Commands/Concerns/InstallsForNode.php

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ protected function publishJsFilesForNode()
4848
File::ensureDirectoryExists(resource_path('js/libs'));
4949

5050
File::copy(__DIR__.'/../../../stubs/resources/js/libs/stimulus.js', resource_path('js/libs/stimulus.js'));
51-
File::copy(__DIR__.'/../../../stubs/resources/js/controllers/hello_controller.js', resource_path('js/controllers/hello_controller.js'));
5251
File::copy(__DIR__.'/../../../stubs/resources/js/controllers/index-node.js', resource_path('js/controllers/index.js'));
5352

5453
$libsIndexFile = resource_path('js/libs/index.js');

stubs/resources/js/controllers/hello_controller.js

-7
This file was deleted.

0 commit comments

Comments
 (0)