Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Add Bun & Deno Support for installStacks (Blade, Livewire, Inertia) #403

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

thecodechef
Copy link
Contributor

@thecodechef thecodechef commented Sep 4, 2024

I noticed that InertiaStack had this but the BladeStack or LiverwireStack didn't so hope this helps

src/Console/installBladeStack.php
-- before --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

-- after --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} elseif (file_exists(base_path('bun.lockb'))) {
    $this->runCommands(['bun install', 'bun run build']);
} elseif (file_exists(base_path('deno.lock'))) {
    $this->runCommands(['deno install', 'deno task build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

src/Console/installLivewireStack.php
-- before --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

-- after --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} elseif (file_exists(base_path('bun.lockb'))) {
    $this->runCommands(['bun install', 'bun run build']);
} elseif (file_exists(base_path('deno.lock'))) {
    $this->runCommands(['deno install', 'deno task build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

src/Console/installInertiaStack.php
-- before --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} elseif (file_exists(base_path('bun.lockb'))) {
    $this->runCommands(['bun install', 'bun run build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

-- after --

if (file_exists(base_path('pnpm-lock.yaml'))) {
    $this->runCommands(['pnpm install', 'pnpm run build']);
} elseif (file_exists(base_path('yarn.lock'))) {
    $this->runCommands(['yarn install', 'yarn run build']);
} elseif (file_exists(base_path('bun.lockb'))) {
    $this->runCommands(['bun install', 'bun run build']);
} elseif (file_exists(base_path('deno.lock'))) {
    $this->runCommands(['deno install', 'deno task build']);
} else {
    $this->runCommands(['npm install', 'npm run build']);
}

@thecodechef thecodechef changed the title Add Bun install script to installBladeStack.php & installLivewireStack.php [2.x] Add Bun install script to installBladeStack.php & installLivewireStack.php Sep 4, 2024
@thecodechef thecodechef changed the title [2.x] Add Bun install script to installBladeStack.php & installLivewireStack.php [2.x] Add Bun & Deno Support for installStacks (Blade, Livewire, Inertia) Sep 4, 2024
@taylorotwell taylorotwell merged commit 79992ec into laravel:2.x Sep 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants