Skip to content

Commit

Permalink
rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Aug 16, 2024
1 parent ef3710d commit ff6d077
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
[![codestyle](https://github.com/gwleuverink/inject-package-assets/actions/workflows/codestyle.yml/badge.svg)](https://github.com/gwleuverink/inject-package-assets/actions/workflows/codestyle.yml)
[![tests](https://github.com/gwleuverink/inject-package-assets/actions/workflows/tests.yml/badge.svg)](https://github.com/gwleuverink/inject-package-assets/actions/workflows/tests.yml)

Simplify your Laravel package development by automatically injecting assets into web responses. No manual inclusion required for your package users! 🚀
Simplify your Laravel package development by automatically injecting js & css assets into web responses. No manual inclusion required for your package users! 🚀

## Installation

Install the package via Composer:

```bash
composer require leuverink/inject-assets
composer require leuverink/asset-injector
```

## Usage
Expand All @@ -20,7 +20,7 @@ composer require leuverink/inject-assets
```php
namespace YourPackage;

use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;


class InjectAssets implements AssetInjector
Expand Down Expand Up @@ -58,15 +58,15 @@ class InjectAssets implements AssetInjector
namespace YourPackage;

use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;

class ServiceProvider extends BaseServiceProvider
{
public function register()
{
$this->app->bind(
AssetInjector::class,
fn() => new \YourPackage\InjectAssets
fn() => new \YourPackage\AssetInjector
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "leuverink/inject-assets",
"name": "leuverink/asset-injector",
"description": "Automatically inject your package assets onto the page",
"type": "library",
"license": "MIT",
"autoload": {
"psr-4": {
"Leuverink\\InjectAssets\\": "src/",
"Leuverink\\AssetInjector\\": "src/",
"Tests\\": "tests/"
}
},
Expand Down Expand Up @@ -34,7 +34,7 @@
"extra": {
"laravel": {
"providers": [
"Leuverink\\InjectAssets\\ServiceProvider"
"Leuverink\\AssetInjector\\ServiceProvider"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/AssetInjector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Leuverink\InjectAssets\Contracts;
namespace Leuverink\AssetInjector\Contracts;

interface AssetInjector
{
Expand Down
4 changes: 2 additions & 2 deletions src/InjectAssets.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Leuverink\InjectAssets;
namespace Leuverink\AssetInjector;

use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;
use Illuminate\Foundation\Http\Events\RequestHandled;

class InjectAssets
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Leuverink\InjectAssets;
namespace Leuverink\AssetInjector;

use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Http\Events\RequestHandled;
Expand Down
2 changes: 1 addition & 1 deletion testbench.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
providers:
- Leuverink\InjectAssets\ServiceProvider
- Leuverink\AssetInjector\ServiceProvider
2 changes: 1 addition & 1 deletion tests/Feature/InjectsAssetsTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;

it('injects assets into head tag', function () {
Route::get('test-inject-in-response', fn () => '<html><head></head></html>');
Expand Down
2 changes: 1 addition & 1 deletion tests/Implement.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tests;

use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;

class Implement implements AssetInjector
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Orchestra\Testbench\Concerns\WithWorkbench;
use Orchestra\Testbench\TestCase as BaseTestCase;
use Leuverink\InjectAssets\Contracts\AssetInjector;
use Leuverink\AssetInjector\Contracts\AssetInjector;

abstract class TestCase extends BaseTestCase
{
Expand Down

0 comments on commit ff6d077

Please sign in to comment.