Skip to content

Commit

Permalink
chore: merge branch 'feat-base'
Browse files Browse the repository at this point in the history
Let me just merge this for now 😅

* feat-base: (41 commits)
  feat(dev): enable debug config
  fix(tests): fix end-to-end test on browserstack
  feat(ui): improve accessibility on auth forms
  chore(deploy): update deployment config
  chore(dev): add `xdebug.php-debug` as extension recommendation
  chore(ui): define additional page component options
  chore(ci): update action workflow configs
  chore: rearrange utils based on context
  chore: update route param definition
  chore: add a bit flexibility to build the assets
  chore: improve accessibility on login form
  chore(dev): force dev host to IPv4
  refactor: decouple page section into dedicated components
  chore: clean up `shim.d.ts` and add page component name
  refactor: move `app-wrapper.vue` to `app/wrapper.vue`
  chore: set `fallbackLocale` to `en`
  chore: add type definition for component option 1092c6e
  feat: make use of `defineOptions()` to assign page title
  chore: update ziggy route function override
  chore: patch 6890392 mark naive-ui discrete api as readonly?
  ...
  • Loading branch information
feryardiant committed Oct 3, 2023
2 parents 6b23a66 + 89d0c1e commit 6d81368
Show file tree
Hide file tree
Showing 74 changed files with 1,321 additions and 1,259 deletions.
16 changes: 1 addition & 15 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,11 @@ AWS_USE_PATH_STYLE_ENDPOINT=false

# DUSK_HEADLESS_DISABLED=true
# TELESCOPE_ENABLED=false
# DEBUGBAR_ENABLED=false

BROWSERSTACK_USERNAME=
BROWSERSTACK_ACCESS_KEY=

SENTRY_DSN=

VITE_API_URL="${APP_URL}/api"
VITE_SENTRY_DSN="${SENTRY_DSN}"

# PUSHER_APP_ID=
# PUSHER_APP_KEY=
# PUSHER_APP_SECRET=
# PUSHER_HOST=
# PUSHER_PORT=443
# PUSHER_SCHEME=https
# PUSHER_APP_CLUSTER=mt1

# VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
# VITE_PUSHER_HOST="${PUSHER_HOST}"
# VITE_PUSHER_PORT="${PUSHER_PORT}"
# VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
# VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
21 changes: 8 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Prepare Environments
run: |
Expand All @@ -60,9 +58,11 @@ jobs:
cache: pnpm
node-version: 18.x

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -72,20 +72,15 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install PHP dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer install --prefer-dist --no-interaction --no-progress
composer ziggy:generate
run: composer install --prefer-dist --no-interaction --no-progress

- name: Install node.js dependencies
run: pnpm install

- name: Build frontend
run: pnpm build --mode ${{ vars.APP_ENV }}
run: |
composer ziggy:generate
pnpm build --mode ${{ vars.APP_ENV }}
- name: Deploy
uses: deployphp/action@v1
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,9 @@ jobs:
runs-on: ubuntu-latest
name: Build

env:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -134,9 +129,11 @@ jobs:
name: public
path: public/build

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -146,10 +143,7 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install PHP dependencies
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer update --prefer-dist --no-interaction --no-progress
composer ziggy:generate
run: composer update --prefer-dist --no-interaction --no-progress

- name: Run unit tests
run: php artisan test --ansi --coverage
Expand Down Expand Up @@ -210,9 +204,11 @@ jobs:
name: public
path: public/build

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -223,9 +219,7 @@ jobs:

- name: Install PHP dependencies
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer install --prefer-dist --no-interaction --no-progress
composer ziggy:generate
- name: Setup BrowserStack env # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"recommendations": [
"adrianwilczynski.alpine-js-intellisense",
"amiralizadeh9480.laravel-extra-intellisense",
"bmewburn.vscode-intelephense-client",
"cpylua.language-postcss",
Expand All @@ -15,6 +14,7 @@
"onecentlin.laravel-blade",
"rangav.vscode-thunder-client",
"voorjaar.windicss-intellisense",
"vue.volar"
"vue.volar",
"xdebug.php-debug"
]
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
}
16 changes: 16 additions & 0 deletions app/Http/Controllers/TestController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Http\Controllers;

use Inertia\Inertia;

class TestController extends Controller
{
/**
* @return \Inertia\Response
*/
public function __invoke()
{
return Inertia::render('test');
}
}
19 changes: 7 additions & 12 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace App\Providers;

use App\View\Composers\NavigationsComposer;
use App\View\Composers\TranslationsComposer;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

Expand All @@ -21,6 +19,7 @@ public function register()
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
// $this->app->register(TelescopeServiceProvider::class);
}
// .
}

/**
Expand All @@ -30,17 +29,13 @@ public function register()
*/
public function boot()
{
/**
* While not in production, send all email tho the following address instead.
*
* @see https://laravel.com/docs/9.x/mail#using-a-global-to-address
*/
if (! $this->app->environment('production') && $devMail = env('MAIL_DEVELOPMENT')) {
Mail::alwaysTo($devMail);
}
$this->bootViewComposers();

View::composer('app', NavigationsComposer::class);
// .
}

View::composer('app', TranslationsComposer::class);
private function bootViewComposers(): void
{
View::composer('*', NavigationsComposer::class);
}
}
6 changes: 3 additions & 3 deletions app/View/Composers/NavigationsComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ protected function main()
'type' => 'divider',
],
[
'route' => null,
'route' => 'parent.home',
'label' => 'Sample Menu',
'icon' => 'tabler:box',
'children' => [
[
'route' => null,
'route' => 'parent.child-1.home',
'label' => 'Sample SubMenu 1',
'icon' => 'tabler:box',
],
[
'route' => null,
'route' => 'parent.child-2.home',
'label' => 'Sample SubMenu 2',
'icon' => 'tabler:box',
],
Expand Down
26 changes: 0 additions & 26 deletions app/View/Composers/TranslationsComposer.php

This file was deleted.

14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@
"support": {
"source": "https://github.com/creasico/laravel-project"
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:creasico/laravel-base.git"
}
],
"require": {
"php": ">=8.1",
"creasi/laravel-nusa": "^0.0.5",
"creasi/laravel-base": "dev-main",
"creasi/laravel-nusa": "^0.1.2",
"fakerphp/faker": "^1.9.1",
"guzzlehttp/guzzle": "^7.2",
"inertiajs/inertia-laravel": "^0.6.9",
Expand Down Expand Up @@ -52,8 +59,7 @@
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan vendor:publish --tag creasi-config --ansi"
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
Expand All @@ -62,7 +68,7 @@
"@php artisan key:generate --ansi"
],
"dep": [
"vendor/bin/dep -f scripts/deploy.php"
"vendor/bin/dep --ansi -f scripts/deploy.php"
],
"fix": [
"pint --preset laravel --ansi"
Expand Down
Loading

0 comments on commit 6d81368

Please sign in to comment.