initial commit
This commit is contained in:
parent
b9f5c4e0be
commit
b33a0ef7e4
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
.### Project Specific
|
||||||
|
# Files
|
||||||
|
.phpunit.result.cache
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
/storage/*.key
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
/node_modules
|
||||||
|
/vendor
|
||||||
|
|
||||||
|
### Editor Specific
|
||||||
|
# Files
|
||||||
|
laravel-image-converter.sublime-project
|
||||||
|
laravel-image-converter.sublime-workspace
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
### System Specific
|
||||||
|
# Files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
__MACOSX
|
42
.php_cs.dist.php
Normal file
42
.php_cs.dist.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = Symfony\Component\Finder\Finder::create()
|
||||||
|
->in([
|
||||||
|
__DIR__ . '/src',
|
||||||
|
__DIR__ . '/tests',
|
||||||
|
])
|
||||||
|
->name('*.php')
|
||||||
|
->notName('*.blade.php')
|
||||||
|
->ignoreDotFiles(true)
|
||||||
|
->ignoreVCS(true);
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setRules([
|
||||||
|
'@PSR2' => true,
|
||||||
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
|
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
||||||
|
'no_unused_imports' => true,
|
||||||
|
'not_operator_with_successor_space' => true,
|
||||||
|
'trailing_comma_in_multiline' => true,
|
||||||
|
'phpdoc_scalar' => true,
|
||||||
|
'unary_operator_spaces' => true,
|
||||||
|
'binary_operator_spaces' => true,
|
||||||
|
'blank_line_before_statement' => [
|
||||||
|
'statements' => [
|
||||||
|
'break',
|
||||||
|
'continue',
|
||||||
|
'declare',
|
||||||
|
'return',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'phpdoc_single_line_var_spacing' => true,
|
||||||
|
'phpdoc_var_without_name' => true,
|
||||||
|
'method_argument_space' => [
|
||||||
|
'on_multiline' => 'ensure_fully_multiline',
|
||||||
|
'keep_multiple_spaces_after_comma' => true,
|
||||||
|
],
|
||||||
|
'single_trait_insert_per_statement' => true,
|
||||||
|
])
|
||||||
|
->setFinder($finder);
|
16
CHANGELOG.md
Normal file
16
CHANGELOG.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Changelog
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.0.0] - 20XX-00-00
|
||||||
|
### Added
|
||||||
|
- Thing
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
63
composer.json
Normal file
63
composer.json
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"name": "captbrogers/laravel-image-converter",
|
||||||
|
"description": "A package to take an image and create copies in Webp and AVIF formats.",
|
||||||
|
"keywords": [
|
||||||
|
"captbrogers",
|
||||||
|
"laravel",
|
||||||
|
"image",
|
||||||
|
"convert",
|
||||||
|
"avif",
|
||||||
|
"webp"
|
||||||
|
],
|
||||||
|
"homepage": "https://git.ditoforge.com/brian/laravel-image-converter",
|
||||||
|
"license": "GPLv2",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Brian Rogers",
|
||||||
|
"email": "captbrogers@gmail.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": "^8.0",
|
||||||
|
"illuminate/contracts": "^8.37"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"brianium/paratest": "^6.2",
|
||||||
|
"codeception/codeception": "^4.1",
|
||||||
|
"nunomaduro/collision": "^5.3",
|
||||||
|
"orchestra/testbench": "^6.15",
|
||||||
|
"phpunit/phpunit": "^9.3",
|
||||||
|
"vimeo/psalm": "^4.4"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Captbrogers\\ImageConverter\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Captbrogers\\ImageConverter\\Tests\\": "tests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"psalm": "vendor/bin/psalm",
|
||||||
|
"test": "./vendor/bin/testbench package:test --parallel --no-coverage",
|
||||||
|
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Captbrogers\\ImageConverter\\ImageConverterServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
"ImageConverter": "Captbrogers\\ImageConverter\\ImageConverterFacade"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true
|
||||||
|
}
|
9145
composer.lock
generated
Normal file
9145
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
0
config/image-converter.php
Normal file
0
config/image-converter.php
Normal file
17
src/Commands/ImageConverterCommand.php
Normal file
17
src/Commands/ImageConverterCommand.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Captbrogers\ImageConverter\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class ImageConverterCommand extends Command
|
||||||
|
{
|
||||||
|
public $signature = 'imageconverter';
|
||||||
|
|
||||||
|
public $description = 'My command';
|
||||||
|
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->comment('All done');
|
||||||
|
}
|
||||||
|
}
|
8
src/ImageConverter.php
Normal file
8
src/ImageConverter.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Captbrogers\ImageConverter;
|
||||||
|
|
||||||
|
class ImageConverter
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
16
src/ImageConverterFacade.php
Normal file
16
src/ImageConverterFacade.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Captbrogers\ImageConverter;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Facade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see \Captbrogers\ImageConverter\ImageConverter
|
||||||
|
*/
|
||||||
|
class ImageConverterFacade extends Facade
|
||||||
|
{
|
||||||
|
protected static function getFacadeAccessor()
|
||||||
|
{
|
||||||
|
return 'image-converter';
|
||||||
|
}
|
||||||
|
}
|
23
src/ImageConverterServiceProvider.php
Normal file
23
src/ImageConverterServiceProvider.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Captbrogers\ImageConverter;
|
||||||
|
|
||||||
|
use Spatie\LaravelPackageTools\Package;
|
||||||
|
use Spatie\LaravelPackageTools\PackageServiceProvider;
|
||||||
|
use Captbrogers\ImageConverter\Commands\ImageConverterCommand;
|
||||||
|
|
||||||
|
class ImageConverterServiceProvider extends PackageServiceProvider
|
||||||
|
{
|
||||||
|
public function configurePackage(Package $package): void
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* This class is a Package Service Provider
|
||||||
|
*
|
||||||
|
* More info: https://github.com/spatie/laravel-package-tools
|
||||||
|
*/
|
||||||
|
$package
|
||||||
|
->name('image-converter')
|
||||||
|
->hasConfigFile()
|
||||||
|
->hasCommand(ImageConverterCommand::class);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user