Skip to content

Commit

Permalink
Typos and more cleanups (#109)
Browse files Browse the repository at this point in the history
* typo and removed obsolete sw files

* Cleanup of vendor assets, now built in package

* Publish in CI too
  • Loading branch information
annejan authored Jun 12, 2022
1 parent 8640b28 commit 67525e9
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 855 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
DB_USERNAME: root
DB_PASSWORD: root
run: php artisan sitemap:generate
- name: Publish assets
run: php artisan horizon:publish && php artisan livewire:publish
- name: Config clear
run: php artisan config:clear
- name: Route clear
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ jobs:
run: php artisan config:clear
- name: Clear route cache
run: php artisan route:clear
- run: 'echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > public/version.json'
- name: Publish assets
run: php artisan horizon:publish && php artisan livewire:publish
- name: Add version.json
run: 'echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > public/version.json'
shell: bash
- name: Make ./storage group writable for, code_owner != run_user
run: chmod 775 ./storage
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/node_modules
/public/hot
/public/storage
/public/fonts/
/public/vendor
/public/fonts
/public/mix-manifest.json
/public/css/app.css
/public/js/app.js
Expand Down Expand Up @@ -30,8 +31,9 @@ _ide_helper.php
.phpstorm.meta.php
.env
/.php_cs.cache
/storage/api-docs/
/storage/api-docs
/database/mariadb
/public/vendor/livewire
laravel-echo-server.*
/public/sw.js.LICENSE.txt
/public/sw.js.LICENSE.txt
/resources/views/vendor
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ yarn
yarn production
```

Install assets.

```bash
php artisan horizon:publish
php artisan livewire:publish
```

Installing and configuring the async websocket server.

```bash
Expand Down
59 changes: 48 additions & 11 deletions config/livewire.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
|--------------------------------------------------------------------------
|
| This value sets the root namespace for Livewire component classes in
| your application. This value effects component auto-discovery and
| any livewire file helper commands, like `artisan make:livewire`.
| your application. This value affects component auto-discovery and
| any Livewire file helper commands, like `artisan make:livewire`.
|
| After changing this item, run: `php artisan livewire:discover`
| After changing this item, run: `php artisan livewire:discover`.
|
*/

Expand All @@ -24,13 +24,25 @@
| View Path
|--------------------------------------------------------------------------
|
| This value sets the path for Livewire component views. This effects
| File manipulation helper commands like `artisan make:livewire`
| This value sets the path for Livewire component views. This affects
| file manipulation helper commands like `artisan make:livewire`.
|
*/

'view_path' => resource_path('views/livewire'),

/*
|--------------------------------------------------------------------------
| Layout
|--------------------------------------------------------------------------
| The default layout view that will be used when rendering a component via
| Route::get('/some-endpoint', SomeComponent::class);. In this case the
| the view returned by SomeComponent will be wrapped in "layouts.app"
|
*/

'layout' => 'layouts.app',

/*
|--------------------------------------------------------------------------
| Livewire Assets URL
Expand All @@ -40,36 +52,61 @@
| your app's domain root is not the correct path. By default, Livewire
| will load its JavaScript assets from the app's "relative root".
|
| Examples: "/assets", "myurl.com/app"
| Examples: "/assets", "myurl.com/app".
|
*/

'asset_url' => null,
'asset_url' => null,

/*
|--------------------------------------------------------------------------
| Livewire Endpoint Middleware Group
|--------------------------------------------------------------------------
|
| This value sets the middleware group that will be applied to the main
| Livewire "message" endpoint (the endpoint that gets hit everytime,
| Livewire "message" endpoint (the endpoint that gets hit everytime
| a Livewire component updates). It is set to "web" by default.
|
*/

'middleware_group' => 'web',
'middleware_group' => 'web',

/*
|--------------------------------------------------------------------------
| Livewire Temporary File Uploads Endpoint Configuration
|--------------------------------------------------------------------------
|
| Livewire handles file uploads by storing uploads in a temporary directory
| before the file is validated and stored permanently. All file uploads
| are directed to a global endpoint for temporary storage. The config
| items below are used for customizing the way the endpoint works.
|
*/

'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' Default 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs.
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated.
],

/*
|--------------------------------------------------------------------------
| Manifest File Path
|--------------------------------------------------------------------------
|
| This value sets the path to Livewire manifest file path.
| This value sets the path to the Livewire manifest file.
| The default should work for most cases (which is
| "<app_root>/bootstrap/cache/livewire-components.php)", but for specific
| cases like when hosting on Laravel Vapor, it could be set to a different value.
|
| Example: For Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php"
| Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php".
|
*/

Expand Down
10 changes: 3 additions & 7 deletions public/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const cacheName = 'hatchery::20200324';
const cacheName = 'hatchery::22061217';

self.addEventListener('install', e => {
e.waitUntil(
Expand All @@ -21,12 +21,8 @@ self.addEventListener('install', e => {
'/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf',
'/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg',
'/mix-manifest.json',
'/0.js',
'/2.js',
'/icons/blank.gif',
'/icons/back.gif',
'/icons/tar.gif',
'/icons/compressed.gif',
'/js/806.js',
'/js/867.js',
'/vendor/webauthn/webauthn.js',
'/vendor/horizon/app.css',
'/vendor/horizon/img/horizon.svg',
Expand Down
8 changes: 0 additions & 8 deletions public/vendor/horizon/app-dark.css

This file was deleted.

8 changes: 0 additions & 8 deletions public/vendor/horizon/app.css

This file was deleted.

1 change: 0 additions & 1 deletion public/vendor/horizon/app.js

This file was deleted.

Binary file removed public/vendor/horizon/img/favicon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions public/vendor/horizon/img/horizon.svg

This file was deleted.

Loading

0 comments on commit 67525e9

Please sign in to comment.