-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b46f804
Showing
8 changed files
with
169 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* text=auto | ||
|
||
/.github export-ignore | ||
/tests export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php-cs-fixer.dist.php export-ignore |
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,49 @@ | ||
name: CI-CD | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
php-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [8.0, 8.1] | ||
stability: [prefer-stable] | ||
experimental: [false] | ||
|
||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
name: PHP ${{ matrix.php }} (${{ matrix.stability }}) | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
extensions: mbstring, bcmath | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Composer Install | ||
run: | | ||
composer validate | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | ||
- name: PHPCS | ||
run: composer phpcs |
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,12 @@ | ||
/.idea | ||
/.vscode | ||
/coverage | ||
/phpunit.xml | ||
/vendor | ||
.DS_Store | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
clover.xml | ||
composer.lock | ||
composer.phar | ||
Thumbs.db |
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,8 @@ | ||
<?php | ||
|
||
$finder = (new PhpCsFixer\Finder()) | ||
->in(__DIR__.'/src') | ||
// ->in(__DIR__.'/tests/src') | ||
->ignoreVCSIgnored(true); | ||
|
||
return (new \DistortedFusion\PhpCsFixerConfig\Config())->setFinder($finder); |
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,3 @@ | ||
# Blade Colors | ||
|
||
CSS variable color management. |
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,44 @@ | ||
{ | ||
"name": "distortedfusion/blade-colors", | ||
"description": "CSS variable color management.", | ||
"license": "MIT", | ||
"keywords": ["laravel", "tailwind", "colors", "distortedfusion"], | ||
"authors": [ | ||
{ | ||
"name": "Kevin Dierkx", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.0", | ||
"illuminate/support": "^7.0|^8.0|^9.0|^10.0|^11.0" | ||
}, | ||
"require-dev": { | ||
"distortedfusion/php-cs-fixer-config": "^2.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"DistortedFusion\\BladeForms\\": "src/" | ||
} | ||
}, | ||
"scripts": { | ||
"phpcs-fix" : "php-cs-fixer fix --using-cache=no --allow-risky=yes --ansi", | ||
"phpcs": "php-cs-fixer fix -v --diff --dry-run --allow-risky=yes --ansi", | ||
"test": [ | ||
"@phpcs" | ||
] | ||
}, | ||
"scripts-descriptions": { | ||
"phpcs": "Runs coding style test suite", | ||
"test": "Runs all tests" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"DistortedFusion\\BladeColors\\BladeColorsServiceProvider" | ||
] | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Empty file.
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,46 @@ | ||
<?php | ||
|
||
namespace DistortedFusion\BladeForms; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use Illuminate\View\Compilers\BladeCompiler; | ||
|
||
class BladeFormsServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Register the service provider. | ||
* | ||
* @return void | ||
*/ | ||
public function register(): void | ||
{ | ||
if (! defined('DF_BC_PATH')) { | ||
define('DF_BC_PATH', realpath(__DIR__.'/../')); | ||
} | ||
} | ||
|
||
/** | ||
* Boot the service provider. | ||
* | ||
* @return void | ||
*/ | ||
public function boot(): void | ||
{ | ||
$this->offerPublishing(); | ||
$this->registerResources(); | ||
} | ||
|
||
private function offerPublishing(): void | ||
{ | ||
if ($this->app->runningInConsole()) { | ||
$this->publishes([ | ||
DF_BC_PATH.'/resources/views' => resource_path('views/vendor/blade-colors'), | ||
], 'blade-colors-views'); | ||
} | ||
} | ||
|
||
private function registerResources(): void | ||
{ | ||
$this->loadViewsFrom(DF_BC_PATH.'/resources/views', 'blade-colors'); | ||
} | ||
} |