Skip to content

Commit

Permalink
Fix install pointing to wrong path
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Sep 15, 2021
1 parent 5f2740b commit bba76fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Commands/TurboInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function handle()
File::ensureDirectoryExists(resource_path('js/libs'));

File::copy(__DIR__ . '/../../stubs/resources/js/app.js', resource_path('js/app.js'));
File::copy(__DIR__ . '/../../stubs/resources/js/turbo.js', resource_path('js/libs/turbo.js'));
File::copy(__DIR__ . '/../../stubs/resources/js/libs/turbo.js', resource_path('js/libs/turbo.js'));

if ($this->option('jet')) {
$this->injectAlpine();
Expand Down Expand Up @@ -78,7 +78,7 @@ public function handle()

private function injectAlpine(): void
{
File::copy(__DIR__ . '/../../stubs/resources/js/alpine.js', resource_path('js/libs/alpine.js'));
File::copy(__DIR__ . '/../../stubs/resources/js/libs/alpine.js', resource_path('js/libs/alpine.js'));

$this->replaceJsStub(
resource_path('js/app.js'),
Expand All @@ -89,7 +89,7 @@ private function injectAlpine(): void

private function injectStimulus(): void
{
File::copy(__DIR__ . '/../../stubs/resources/js/stimulus.js', resource_path('js/libs/stimulus.js'));
File::copy(__DIR__ . '/../../stubs/resources/js/libs/stimulus.js', resource_path('js/libs/stimulus.js'));

$this->replaceJsStub(
resource_path('js/app.js'),
Expand Down
2 changes: 1 addition & 1 deletion stubs/resources/js/libs/stimulus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { Application } from '@hotwired/stimulus'
import { definitionsFromContext } from '@stimulus/webpack-helpers'

const application = Application.start()
const context = require.context("./controllers", true, /\.js$/)
const context = require.context("../controllers", true, /\.js$/)
application.load(definitionsFromContext(context))

0 comments on commit bba76fb

Please sign in to comment.