Skip to content

Commit

Permalink
refactoring to middleware / new filter trimruls / tests
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomarinho committed Sep 23, 2017
1 parent 6b39876 commit db64985
Show file tree
Hide file tree
Showing 25 changed files with 1,388 additions and 348 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ You can install the package via composer:
$ composer require renatomarinho/laravel-page-speed
```

Next, the \RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class - middleware must be registered in the kernel:
Next, the \RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class and others - middleware must be registered in the kernel:

```php
//app/Http/Kernel.php

protected $middleware = [
...
\RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class
\RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class,
\RenatoMarinho\LaravelPageSpeed\Middleware\RemoveComments::class,
\RenatoMarinho\LaravelPageSpeed\Middleware\TrimUrls::class,
]
```

Expand All @@ -37,6 +39,11 @@ protected $middleware = [
## Roadmap : Filters

<table>
<tr>
<td>trim_urls</td>
<td>Removes unnecessary prefixes from URLs</td>
<td>YES</td>
<tr>
<tr>
<td><strong>Name</strong></td>
<td><strong>Description</strong></td>
Expand Down Expand Up @@ -237,11 +244,7 @@ protected $middleware = [
<td>Sprites images</td>
<td>NO</td>
<tr>
<tr>
<td>trim_urls</td>
<td>Removes unnecessary prefixes from URLs</td>
<td>NO</td>
<tr>

</table>

<hr />
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"php": ">=5.6",
"illuminate/support": "5.3.x|5.4.x|5.5.x"
},
"require-dev": {
"phpunit/phpunit": "^6.2",
"orchestra/testbench": "~3.2"
},
"autoload": {
"psr-4": {
"RenatoMarinho\\LaravelPageSpeed\\": "src/"
Expand All @@ -29,16 +33,11 @@
"RenatoMarinho\\LaravelPageSpeed\\Test\\": "tests"
}
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.2",
"orchestra/testbench": "3.x",
"squizlabs/php_codesniffer": "^2.3"
},
"scripts": {
"test": "phpunit",
"check-style": "phpcs -p --standard=PSR2 src/",
"fix-style": "phpcbf -p --standard=PSR2 src/"
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
Loading

0 comments on commit db64985

Please sign in to comment.