Bun
- Essentials
@@ -175,10 +179,21 @@ That's it. You'll have your first project accessible in the end (displaying the
> **Note**
> If you want to debug the process or display all output during the scripts, change the `LOGGING_LEVEL` variable in your [[.env](./.env)] file.
+### Breeze Scaffolding
+
+There's an option not to remove Breeze views and routes during the creation script, but you still need to link them yourself afterwards:
+
+1. First, make your [app/Providers/RouteServiceProvider.php] point to `'/dashboard';` as the `$HOME` constant.
+2. Add the `welcome` view to your routes and `name` it `home`.
+3. Also add the rest of Breeze routes by doing `require __DIR__ . '/auth.php';` in your route's file [web.php] as well.
+
+> **Note**
+> If you chose to remove them, however, their controllers are still going to be available for reference...
+
## Before Production
-- Reset [app/Http/Middleware/TrustedProxies.php]'s property to `protected $proxies;`, if you'd provided an Expose token.
+- if you'd provided an Expose token, reset [app/Http/Middleware/TrustedProxies.php]'s property to `protected $proxies;`.
## Todos For Development:
diff --git a/files/.opinionated/.prettierrc b/files/.opinionated/.prettierrc
old mode 100644
new mode 100755
diff --git a/files/.opinionated/extensions.md b/files/.opinionated/extensions.md
index ee52059..7e887f2 100755
--- a/files/.opinionated/extensions.md
+++ b/files/.opinionated/extensions.md
@@ -5,17 +5,17 @@
> [!WARNING]
Manual updates are required for the extensions that aren't published yet on [Open VSX](https://open-vsx.org)
- [patbenatar.advanced-new-file](https://github.com/patbenatar/vscode-advanced-new-file)
-- [pcbowers.alpine-intellisense](https://github.com/pcbowers/alpine-intellisense) [Not on VSX yet]
+- [pcbowers.alpine-intellisense](https://github.com/pcbowers/alpine-intellisense) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=pcbowers.alpine-intellisense)]
- [formulahendry.auto-rename-tag](https://github.com/formulahendry/vscode-auto-rename-tag)
- [chouzz.vscode-better-align](https://github.com/chouzz/vscode-better-align)
- [aaron-bond.better-comments](https://github.com/aaron-bond/better-comments)
-- [m1guelpf.better-pest](https://github.com/m1guelpf/better-pest) [Not on VSX yet]
-- [calebporzio.better-phpunit](https://github.com/calebporzio/better-phpunit) [Not on VSX yet]
+- [m1guelpf.better-pest](https://github.com/m1guelpf/better-pest) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=m1guelpf.better-pest)]
+- [calebporzio.better-phpunit](https://github.com/calebporzio/better-phpunit) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=calebporzio.better-phpunit)]
- [wmaurer.change-case](https://github.com/wmaurer/vscode-change-case)
- [Equinusocio.vsc-community-material-theme](https://github.com/material-theme/vsc-community-material-theme) (Darker High Contrast)
- [moshfeu.compare-folders](https://github.com/moshfeu/vscode-compare-folders)
-- [cshum.convert-newline-list-to-array](https://github.com/colinshum/vsc-newline-to-array) [Not on VSX yet]
-- [ctf0.env-symbol-provider](https://github.com/ctf0/env-symbol-provider.git) [Not on VSX yet]
+- [cshum.convert-newline-list-to-array](https://github.com/colinshum/vsc-newline-to-array) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=cshum.convert-newline-list-to-array)]
+- [ctf0.env-symbol-provider](https://github.com/ctf0/env-symbol-provider.git) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.env-symbol-provider)]
- [sleistner.vscode-fileutils](https://github.com/sleistner/vscode-fileutils)
- [prantlf.fold-on-open](https://github.com/prantlf/vscode-fold-on-open)
- [eamodio.gitlens](https://github.com/gitkraken/vscode-gitlens)
@@ -24,38 +24,38 @@
- [porifa.laravel-intelephense](https://github.com/porifa/vscode-laraphense)
- [shufo.vscode-blade-formatter](https://github.com/shufo/vscode-blade-formatter)
- [onecentlin.laravel-blade](https://github.com/onecentlin/laravel-blade-snippets-vscode)
-- [IHunte.laravel-blade-wrapper](https://github.com/IHunte/Laravel-Blade-Wrapper) [Not on VSX yet]
-- [austenc.laravel-docs](https://github.com/austenc/vscode-laravel-docs) [Not on VSX yet]
+- [IHunte.laravel-blade-wrapper](https://github.com/IHunte/Laravel-Blade-Wrapper) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=IHunte.laravel-blade-wrapper)]
+- [austenc.laravel-docs](https://github.com/austenc/vscode-laravel-docs) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=austenc.laravel-docs)]
- [amiralizadeh9480.laravel-extra-intellisense](https://github.com/amir9480/vscode-laravel-extra-intellisense)
-- [ctf0.laravel-goto-config](https://github.com/ctf0/laravel-goto-config) [Not on VSX yet]
-- [ctf0.laravel-goto-env](https://github.com/ctf0/laravel-goto-env) [Not on VSX yet]
-- [ctf0.laravel-goto-lang](https://github.com/ctf0/laravel-goto-lang) [Not on VSX yet]
-- [ctf0.laravel-goto-path](https://github.com/ctf0/laravel-goto-path) [Not on VSX yet]
+- [ctf0.laravel-goto-config](https://github.com/ctf0/laravel-goto-config) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.laravel-goto-config)]
+- [ctf0.laravel-goto-env](https://github.com/ctf0/laravel-goto-env) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.laravel-goto-env)]
+- [ctf0.laravel-goto-lang](https://github.com/ctf0/laravel-goto-lang) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.laravel-goto-lang)]
+- [ctf0.laravel-goto-path](https://github.com/ctf0/laravel-goto-path) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.laravel-goto-path)]
- [naoray.laravel-goto-components](https://github.com/Naoray/laravel-goto-components)
-- [austenc.livewire-docs](https://github.com/austenc/vscode-livewire-docs) [Not on VSX yet]
-- [m4tr1ck.livewire-goto-updated-3](https://github.com/m4tr1ck/vscode-livewire-goto) [Not on VSX yet]
-- [bebo925.livewire-switcher](https://github.com/bebo925/livewire-switcher) [Not on VSX yet]
-- [bierner.markdown-checkbox](https://github.com/mjbvz/vscode-markdown-checkboxes) [Not on VSX yet]
-- [bierner.markdown-emoji](https://github.com/mjbvz/vscode-markdown-emoji) [Not on VSX yet]
+- [austenc.livewire-docs](https://github.com/austenc/vscode-livewire-docs) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=austenc.livewire-docs)]
+- [m4tr1ck.livewire-goto-updated-3](https://github.com/m4tr1ck/vscode-livewire-goto) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=M4tr1ck.livewire-goto-updated-3)]
+- [bebo925.livewire-switcher](https://github.com/bebo925/livewire-switcher) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=bebo925.livewire-switcher)]
+- [bierner.markdown-checkbox](https://github.com/mjbvz/vscode-markdown-checkboxes) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-checkbox)]
+- [bierner.markdown-emoji](https://github.com/mjbvz/vscode-markdown-emoji) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-emoji)]
- [bierner.markdown-preview-github-styles](https://github.com/mjbvz/vscode-github-markdown-preview-style)
- [PKief.material-icon-theme](https://github.com/PKief/vscode-material-icon-theme)
- [ryuta46.multi-command](https://github.com/ryuta46/vscode-multi-command)
-- [ctf0.php-array-symbols](https://github.com/ctf0/vscode-php-array-symbol-provider) [Not on VSX yet]
-- [MehediDracula.php-constructor](https://github.com/MehediDracula/PHP-Constructor) [Not on VSX yet]
+- [ctf0.php-array-symbols](https://github.com/ctf0/vscode-php-array-symbol-provider) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=ctf0.php-array-symbols)]
+- [MehediDracula.php-constructor](https://github.com/MehediDracula/PHP-Constructor) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=MehediDracula.php-constructor)]
- [xdebug.php-debug](https://github.com/xdebug/vscode-php-debug)
- [bmewburn.vscode-intelephense-client](https://github.com/bmewburn/vscode-intelephense)
- [MehediDracula.php-namespace-resolver](https://github.com/MehediDracula/php-namespace-resolver)
-- [jeff-hykin.polacode-2019](https://github.com/jeff-hykin/polacode) [Not on VSX yet]
+- [jeff-hykin.polacode-2019](https://github.com/jeff-hykin/polacode) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=jeff-hykin.polacode-2019)]
- [csstools.postcss](https://github.com/csstools/postcss-language)
- [esbenp.prettier-vscode](https://github.com/prettier/prettier-vscode)
- [sainoba.px-to-rem](https://github.com/sainoba/vscode-px-to-rem)
-- [dbankier.vscode-quick-select](https://github.com/dbankier/vscode-quick-select) [Not on VSX yet]
+- [dbankier.vscode-quick-select](https://github.com/dbankier/vscode-quick-select) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=dbankier.vscode-quick-select)]
- [foxundermoon.shell-format](https://github.com/foxundermoon/vs-shell-format)
- [jock.svg](https://github.com/lishu/vscode-svg2)
- [albert.TabOut](https://github.com/albertromkes/tabout)
- [bradlc.vscode-tailwindcss](https://github.com/tailwindlabs/tailwindcss-intellisense)
-- [austenc.tailwind-docs](https://github.com/austenc/vscode-tailwind-docs) [Not on VSX yet]
-- [bourhaouta.tailwindshades](https://github.com/bourhaouta/vscode-tailwindshades) [Not on VSX yet]
-- [jkjustjoshing.vscode-text-pastry](https://github.com/jkjustjoshing/vscode-text-pastry) [Not on VSX yet]
+- [austenc.tailwind-docs](https://github.com/austenc/vscode-tailwind-docs) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=austenc.tailwind-docs)]
+- [bourhaouta.tailwindshades](https://github.com/bourhaouta/vscode-tailwindshades) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=bourhaouta.tailwindshades)]
+- [jkjustjoshing.vscode-text-pastry](https://github.com/jkjustjoshing/vscode-text-pastry) [Not on VSX yet | [Market Link](https://marketplace.visualstudio.com/items?itemName=jkjustjoshing.vscode-text-pastry)]
- [Gruntfuggly.todo-tree](https://github.com/Gruntfuggly/todo-tree)
- [hideoo.trailing](https://github.com/HiDeoo/trailing)
\ No newline at end of file
diff --git a/files/_stubs/tall/resources/css/packages/alpinejs-breakpoints.css b/files/_stubs/tall/resources/css/packages/alpinejs-breakpoints.css
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/bindings/breakpointer.js b/files/_stubs/tall/resources/js/bindings/breakpointer.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/data/colors-manager.js b/files/_stubs/tall/resources/js/data/colors-manager.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/packages/alpine-animate.js b/files/_stubs/tall/resources/js/packages/alpine-animate.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/packages/alpine-hooks.js b/files/_stubs/tall/resources/js/packages/alpine-hooks.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/packages/auto-animate.js b/files/_stubs/tall/resources/js/packages/auto-animate.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/resources/js/packages/tippy.js b/files/_stubs/tall/resources/js/packages/tippy.js
old mode 100644
new mode 100755
diff --git a/files/_stubs/tall/vite.config.js b/files/_stubs/tall/vite.config.js
old mode 100644
new mode 100755
index f9e4caa..c99e89c
--- a/files/_stubs/tall/vite.config.js
+++ b/files/_stubs/tall/vite.config.js
@@ -4,8 +4,8 @@ import laravel from 'laravel-vite-plugin';
import livewire from '@defstudio/vite-livewire-plugin';
const host = ".test";
-const certPath = path.resolve(__dirname, "./certs/.test.pem");
-const keyPath = path.resolve(__dirname, "./certs/.test-key.pem");
+const certPath = path.resolve(__dirname, `./certs/${host}.pem`);
+const keyPath = path.resolve(__dirname, `./certs/${host}-key.pem`);
export default defineConfig({
plugins: [
@@ -15,11 +15,7 @@ export default defineConfig({
'resources/css/filament/admin/theme.css',
'resources/js/app.js',
],
- refresh: false,
- }),
- livewire({
- refresh: ['resources/css/app.css'],
- watch: [
+ refresh: [
"app/Filament/**/*.php",
"app/Forms/**/*.php",
"app/Infolists/**/*.php",
@@ -32,6 +28,7 @@ export default defineConfig({
"routes/**",
],
}),
+ livewire(),
],
server: {
host,
diff --git a/files/app/Enums/Example.php b/files/app/Enums/Example.php
old mode 100644
new mode 100755
diff --git a/files/config/project-name.php b/files/config/project-name.php
old mode 100644
new mode 100755
diff --git a/files/resources/css/app.css b/files/resources/css/app.css
old mode 100644
new mode 100755
diff --git a/files/resources/css/packages/tippy.css b/files/resources/css/packages/tippy.css
old mode 100644
new mode 100755
diff --git a/files/resources/js/core/echo.js b/files/resources/js/core/echo.js
old mode 100644
new mode 100755
diff --git a/files/vite.config.js b/files/vite.config.js
old mode 100644
new mode 100755
diff --git a/scripts/create.sh b/scripts/create.sh
index 8f32a0b..ac2fb90 100755
--- a/scripts/create.sh
+++ b/scripts/create.sh
@@ -93,26 +93,28 @@ if [ -d "$PROJECTS_DIRECTORY/$escaped_project_name" ]; then
prompt "\nProject folder already exists!" "Project creation cancelled."
fi
+# TODO Add more stacks
# Get the stack choice
-while true; do
- echo -ne "Enter the Laravel stack (tall, tvil, tvil-ssr, tril, tril-ssr, api): " >&3
- read laravel_stack
-
- case "$laravel_stack" in
- tall)
- break
- ;;
- tvil|tvil-ssr|tril|tril-ssr|api)
- echo "The stack script is not ready yet..." >&3
- ;;
- *)
- echo "Unknown stack!" >&3
- ;;
- esac
-done
+# while true; do
+# echo -ne "Enter the Laravel stack (tall, tvil, tvil-ssr, tril, tril-ssr, api): " >&3
+# read laravel_stack
+
+# case "$laravel_stack" in
+# tall)
+# break
+# ;;
+# tvil|tvil-ssr|tril|tril-ssr|api)
+# echo "The stack script is not ready yet..." >&3
+# ;;
+# *)
+# echo "Unknown stack!" >&3
+# ;;
+# esac
+# done
+laravel_stack="tall"
# Get whether the project is localized or not
-echo -ne "Is the project localized? (y/n) " >&3
+echo -ne "\nIs the project localized? (y/n) " >&3
read is_localized
if [ "$is_localized" = "n" ] || [ "$is_localized" = "N" ] || [ "$is_localized" = "no" ] || [ "$is_localized" = "NO" ]; then
is_localized=false
@@ -121,7 +123,7 @@ else
fi
# Get the pest choice
-echo -ne "Do you want to use Laravel Pest over PHPUnit for testing? (y/n) " >&3
+echo -ne "Do you prefer to use Laravel Pest over PHPUnit for testing? (y/n) " >&3
read use_pest
if [ "$use_pest" = "n" ] || [ "$use_pest" = "N" ] || [ "$use_pest" = "no" ] || [ "$use_pest" = "NO" ]; then
use_pest=false
@@ -129,6 +131,15 @@ else
use_pest=true
fi
+# Get a choice whether to remove Breeze views
+echo -ne "Should most of Breeze stuff be removed? (y/n) " >&3
+read remove_breeze
+if [ "$remove_breeze" = "n" ] || [ "$remove_breeze" = "N" ] || [ "$remove_breeze" = "no" ] || [ "$remove_breeze" = "NO" ]; then
+ remove_breeze=false
+else
+ remove_breeze=true
+fi
+
# * =================
# * Project Creation
# * ===============
@@ -262,16 +273,17 @@ composer require --dev laravel/breeze laravel/telescope --with-all-dependencies
if [ "$laravel_stack" = "tall" ]; then
stack="blade"
fi
-if [ "$laravel_stack" = "tvil" ] || [ "$laravel_stack" = "tvil-ssr" ]; then
- stack="vue"
-fi
-if [ "$laravel_stack" = "tril" ] || [ "$laravel_stack" = "tril-ssr" ]; then
- stack="react"
-fi
+# TODO Handle when there are stacks
+# if [ "$laravel_stack" = "tvil" ] || [ "$laravel_stack" = "tvil-ssr" ]; then
+# stack="vue"
+# fi
+# if [ "$laravel_stack" = "tril" ] || [ "$laravel_stack" = "tril-ssr" ]; then
+# stack="react"
+# fi
ssr=""
-if [ "$laravel_stack" = "tvil-ssr" ] || [ "$laravel_stack" = "tril-ssr" ]; then
- ssr="--ssr"
-fi
+# if [ "$laravel_stack" = "tvil-ssr" ] || [ "$laravel_stack" = "tril-ssr" ]; then
+# ssr="--ssr"
+# fi
pest=""
if [ "$use_pest" == true ]; then
pest="--pest"
@@ -313,40 +325,71 @@ if [ "$is_localized" == true ]; then
fi
# * ==========================
-# * NPM Packages Installation
+# * Bun Packages Installation
# * ========================
-echo -e "\nInstalling NPM packages..." >&3
+echo -e "\nInstalling Bun packages..." >&3
+
+export BUN="/home/$USERNAME/.bun/bin/bun"
cd $PROJECTS_DIRECTORY/$escaped_project_name
+if $cancel_suppression; then
+ $BUN install 2>&1
+else
+ $BUN install 2>&1 >/dev/null
+fi
+
if [ "$laravel_stack" = "tall" ]; then
# TALL packages...
- npm install @alpinejs/mask @alpinejs/intersect @alpinejs/focus @alpinejs/collapse @alpinejs/morph @ryangjchandler/alpine-hooks @ralphjsmit/alpine-animate
+ if $cancel_suppression; then
+ $BUN add @alpinejs/mask @alpinejs/intersect @alpinejs/focus @alpinejs/collapse @alpinejs/morph @ryangjchandler/alpine-hooks @ralphjsmit/alpine-animate 2>&1
+ else
+ $BUN add @alpinejs/mask @alpinejs/intersect @alpinejs/focus @alpinejs/collapse @alpinejs/morph @ryangjchandler/alpine-hooks @ralphjsmit/alpine-animate 2>&1 >/dev/null
+ fi
# Uninstall axios
- npm uninstall axios
+ if $cancel_suppression; then
+ $BUN remove axios 2>&1
+ else
+ $BUN remove axios 2>&1 >/dev/null
+ fi
# TALL Dev Packages...
- npm install --save-dev @defstudio/vite-livewire-plugin alpinejs-breakpoints
+ if $cancel_suppression; then
+ $BUN add --dev @defstudio/vite-livewire-plugin alpinejs-breakpoints 2>&1
+ else
+ $BUN add --dev @defstudio/vite-livewire-plugin alpinejs-breakpoints 2>&1 >/dev/null
+ fi
fi
# Dev Packages...
-npm install --save-dev tailwindcss postcss postcss-import autoprefixer @tailwindcss/typography @tailwindcss/forms @tailwindcss/aspect-ratio @whiterussianstudio/tailwind-easing
+if $cancel_suppression; then
+ $BUN add --dev tailwindcss postcss postcss-import autoprefixer @tailwindcss/typography @tailwindcss/forms @tailwindcss/aspect-ratio @whiterussianstudio/tailwind-easing 2>&1
+else
+ $BUN add --dev tailwindcss postcss postcss-import autoprefixer @tailwindcss/typography @tailwindcss/forms @tailwindcss/aspect-ratio @whiterussianstudio/tailwind-easing 2>&1 >/dev/null
+fi
# Packages...
-npm install @tailwindcss/container-queries tippy.js laravel-wave @formkit/auto-animate
+if $cancel_suppression; then
+ $BUN add @tailwindcss/container-queries tippy.js laravel-wave @formkit/auto-animate 2>&1
+else
+ $BUN add @tailwindcss/container-queries tippy.js laravel-wave @formkit/auto-animate 2>&1 >/dev/null
+fi
+
+# Enforce permissions
+sudo $lara_stacker_dir/scripts/helpers/permit.sh $PROJECTS_DIRECTORY/$escaped_project_name
# ! Currently vulnerable!
# TODO add to the others when stable
# Cypress
-sudo $lara_stacker_dir/scripts/helpers/permit.sh $PROJECTS_DIRECTORY/$escaped_project_name
sudo -i -u $USERNAME bash <&1
+ $BUN add --force --dev cypress 2>&1
else
- mkcert npm install --force --save-dev cypress 2>&1 >/dev/null
+ $BUN add --force --dev cypress 2>&1 >/dev/null
fi
EOF
@@ -643,8 +686,7 @@ echo -e "\nConfigured Laravel Permission." >&3
php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="migrations" $conditional_quiet
php artisan migrate $conditional_quiet
-# TODO change tag to 'config' when PR is approved
-php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="settings" $conditional_quiet
+php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="config" $conditional_quiet
echo -e "\nConfigured Laravel Settings." >&3
@@ -680,7 +722,9 @@ BEGIN { RS = ""; ORS = "\n\n" }
{ print }' ./routes/web.php > temp.txt && mv temp.txt ./routes/web.php
fi
-mv ./resources/views/welcome.blade.php ./resources/views/home.blade.php
+if [ "$remove_breeze" == true ]; then
+ mv ./resources/views/welcome.blade.php ./resources/views/home.blade.php
+fi
echo -e "\nSet up Breeze routes in place." >&3
@@ -727,7 +771,7 @@ BEGIN { RS = ""; ORS = "\n\n" }
sed -i 's|//|return redirect()->back();|' ./app/Http/Controllers/LoginRedirect.php
if [ "$is_localized" == true ]; then
- sed -i 's|use Illuminate\\Support\\Facades\\Route;|use App\\Http\\Controllers\\HomeController;\nuse App\\Http\\Controllers\\LoginRedirect;\nuse Illuminate\\Support\\Facades\\Route;\nuse Mcamara\\LaravelLocalization\\Facades\\LaravelLocalization;|' ./routes/web.php
+ sed -i 's|use Illuminate\\Support\\Facades\\Route;|use App\\Http\\Controllers\\HomeController;\nuse App\\Http\\Controllers\\LoginRedirect;\nuse Illuminate\\Support\\Facades\\Route;\nuse Livewire\\Livewire;\nuse Mcamara\\LaravelLocalization\\Facades\\LaravelLocalization;|' ./routes/web.php
awk '
/Route::get\('\''\/'\'', function \(\) {/ && !done {
print "Route::get('\''/'\'', [HomeController::class, '\''home'\''])->name('\''home'\'');";
@@ -789,16 +833,18 @@ use App\\Http\\Controllers\\LoginRedirect;\
' ./routes/web.php > temp.txt && mv temp.txt ./routes/web.php
fi
- sed -i "/App\\Http\\Controllers\\ProfileController;/d" ./routes/web.php
-
- rm -rf ./app/View
- rm -rf ./resources/views/auth
- rm ./resources/views/components/*
- rm -rf ./resources/views/layouts
- rm -rf ./resources/views/profile
- rm ./resources/views/dashboard.blade.php
- rm ./resources/views/home.blade.php
- rm ./routes/auth.php
+ sed -i "/App\\\\Http\\\\Controllers\\\\ProfileController;/d" ./routes/web.php
+
+ if [ "$remove_breeze" == true ]; then
+ rm -rf ./app/View
+ rm -rf ./resources/views/auth
+ rm ./resources/views/components/*
+ rm -rf ./resources/views/layouts
+ rm -rf ./resources/views/profile
+ rm ./resources/views/dashboard.blade.php
+ rm ./resources/views/home.blade.php
+ rm ./routes/auth.php
+ fi
mkdir -p ./resources/views/components/home
mkdir -p ./resources/views/partials
@@ -825,6 +871,8 @@ use App\\Http\\Controllers\\LoginRedirect;\
sed -i "s/'layout' => 'components.layouts.app',/'layout' => 'components.app',/g" ./config/livewire.php
sed -i "s/'disk' => null,/'disk' => 's3',/g" ./config/livewire.php
+ sed -i "s|const HOME = '/dashboard';|const HOME = '/';|g" ./app/Providers/RouteServiceProvider.php
+
echo -e "\nConfigured Livewire framework." >&3
# Alpine Animate package
@@ -1010,14 +1058,15 @@ if [ "$OPINIONATED" == true ]; then
echo -e "\nUpdated .gitignore file." >&3
if [[ $USING_VSC == true && $OPINIONATED == true ]]; then
- # Copy the opinionated VSC keybindings
- sudo cp $lara_stacker_dir/files/.opinionated/keybindings.json ./.vscode/
+ # TODO consider adding shortcuts and settings to the workspace maybe
+ # # Copy the opinionated VSC keybindings
+ # sudo cp $lara_stacker_dir/files/.opinionated/keybindings.json ./.vscode/
- if [ $use_pest == false ]; then
- sudo sed -i 's/better-pest/better-phpunit/g' ./.vscode/keybindings.json
- fi
+ # if [ $use_pest == false ]; then
+ # sudo sed -i 's/better-pest/better-phpunit/g' ./.vscode/keybindings.json
+ # fi
- echo -e "\nCopied VSC workspace key-bindings." >&3
+ # echo -e "\nCopied VSC workspace key-bindings." >&3
# Create a dedicated VSC workspace in Desktop
cd /home/$USERNAME/Desktop
@@ -1044,10 +1093,19 @@ sudo $lara_stacker_dir/scripts/helpers/permit.sh $PROJECTS_DIRECTORY/$escaped_pr
echo -e "\nUpdated directory and file permissions all around." >&3
-# Build the front-end assets
+# Updated Composer packages
composer update -n $conditional_quiet
-npm update
-npm run build
+
+echo -e "\nEnsured Composer packages are up-to-date." >&3
+
+# Update and build the front-end assets
+if $cancel_suppression; then
+ $BUN update 2>&1
+ $BUN run build 2>&1
+else
+ $BUN update 2>&1 >/dev/null
+ $BUN run build 2>&1 >/dev/null
+fi
echo -e "\nFront-end assets compiled successfully and everything is up-to-date." >&3
diff --git a/scripts/functions/prompt.sh b/scripts/functions/prompt.sh
old mode 100644
new mode 100755
diff --git a/scripts/setup.sh b/scripts/setup.sh
index 3be2465..7f0adc4 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -79,10 +79,10 @@ esac
# * Installing System Packages
# * =========================
-# git, php, apache2, redis and npm
+# Installing system packages...
echo -e "Installing system packages..." >&3
-sudo apt install git curl php apache2 php-curl php-xml php-dom php-bcmath php-zip redis-server -y
+sudo apt install git curl php apache2 php-curl php-xml php-dom php-bcmath php-zip redis-server npm -y
sudo sed -i "s~post_max_size = 8M~post_max_size = 100M~g" /etc/php/8.1/apache2/php.ini
sudo sed -i "s~upload_max_filesize = 2M~upload_max_filesize = 100M~g" /etc/php/8.1/apache2/php.ini
@@ -129,20 +129,25 @@ echo -e "\nInstalling Cypress.io dependency packages..." >&3
sudo apt install libgbm-dev libnotify-dev libgconf-2-4 xvfb -y
-# NodeJS Upgrades
-echo -e "\nInstalling NVM to support installing custom NodeJS and NPM versions..." >&3
+# Bun
+echo -e "\nInstalling Bun front-end package manager..." >&3
-# ? Check without: npm install -g npm@9.8.1
sudo -i -u $USERNAME bash <&1
+else
+ $BUN add -g @withgraphite/graphite-cli@stable 2>&1 >/dev/null
+fi
+EOF
+
+echo -e "\nInstalled Graphite version control CLI..." >&3
# Composer (globally)
echo -e "\nInstalling composer globally..." >&3
@@ -293,7 +298,7 @@ EOF
echo -e "\nLinked projects directory into [~/Code/Laravel] directory." >&3
# Install Firacode font (if VSC installed)
- if [[ $USING_VSC == true && $OPINIONATED == true ]]; then
+ if [[ $USING_VSC == true ]]; then
sudo apt install fonts-firacode -y
echo -e "\nInstalled Firacode font for VSC." >&3
@@ -307,7 +312,7 @@ EOF
echo -e "\nCreated a [$PROJECTS_DIRECTORY/.packages] directory." >&3
# Add helper aliases to .bashrc
- echo -e "\n# Laravel Aliases\nalias cda='composer dump-autoload'\nalias art='php artisan'\nalias fresh='php artisan migrate:fresh'\nalias mfs='php artisan migrate:fresh --seed'\nalias opt='php artisan optimize:clear'\nalias dev='npm run dev'\n" >> /home/$USERNAME/.bashrc
+ echo -e "\n# Laravel Aliases\nalias cda='composer dump-autoload'\nalias art='php artisan'\nalias fresh='php artisan migrate:fresh'\nalias mfs='php artisan migrate:fresh --seed'\nalias opt='php artisan optimize:clear'\nalias dev='bun run dev'\n" >> /home/$USERNAME/.bashrc
echo -e "\nAdded some helper aliases to [.bashrc] file. Check 'art' out!" >&3
fi
@@ -316,7 +321,7 @@ fi
# * The End
# * ======
-touch $origin_dir/done-setup.flag
+touch $lara_stacker_dir/done-setup.flag
echo -e "\nSetup done successfully. The following are required:\n" >&3