-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Code optimizations --------- Co-authored-by: Kevin Meijer <[email protected]>
- Loading branch information
1 parent
3af5d3e
commit cc9e88e
Showing
21 changed files
with
169 additions
and
5,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<?php | ||
|
||
Route::namespace('\JustBetter\ImageOptimize\Http\Controllers\CP') | ||
->prefix('statamic-image-optimize') | ||
use Illuminate\Support\Facades\Route; | ||
use JustBetter\ImageOptimize\Http\Controllers\CP\ImageResizeController; | ||
|
||
Route::prefix('statamic-image-optimize') | ||
->name('statamic-image-optimize.') | ||
->group(function() { | ||
Route::get('/', 'ImageResizeController@index') | ||
Route::get('/', [ImageResizeController::class, 'index']) | ||
->name('index'); | ||
Route::get('/resize-images/{forceAll?}', 'ImageResizeController@resizeImages') | ||
Route::get('/resize-images/{forceAll?}', [ImageResizeController::class, 'resizeImages']) | ||
->name('resize-images'); | ||
Route::get('/resize-images-count/{batchId?}', 'ImageResizeController@resizeImagesJobCount') | ||
Route::get('/resize-images-count/{batchId?}', [ImageResizeController::class, 'resizeImagesJobCount']) | ||
->name('resize-images-count'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace JustBetter\ImageOptimize\Contracts; | ||
|
||
use Statamic\Assets\Asset; | ||
|
||
interface ResizesImage | ||
{ | ||
public function resize(Asset $asset, ?int $width = null, ?int $height = null): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace JustBetter\ImageOptimize\Contracts; | ||
|
||
use Illuminate\Bus\Batch; | ||
|
||
interface ResizesImages | ||
{ | ||
public function resize(bool $forceAll = false): Batch; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace JustBetter\ImageOptimize\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
abstract class ImageEvent | ||
{ | ||
use Dispatchable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.