Skip to content

Commit

Permalink
Merge pull request #162 from tbela99/v.next
Browse files Browse the repository at this point in the history
#161 fix installation issues 
#156  provide a link to Joomla doc about how to enable url rewriting
  • Loading branch information
tbela99 authored Jan 14, 2022
2 parents 7a13f7b + 02b1535 commit 810c4a7
Show file tree
Hide file tree
Showing 176 changed files with 9,412 additions and 6,166 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Here are some features provided by this plugin
- remove files based on a pattern
- async loading
- web fonts preloading
- critical css generation based on provided settings
- automatic critical css generation

## Images

Expand Down
Empty file modified build.sh
100755 → 100644
Empty file.
15 changes: 9 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# Joomla Website Optimizer Plugin

![Current version](https://img.shields.io/badge/dynamic/xml?color=green&label=current%20version&query=%2Fextension%2Fversion&url=https%3A%2F%2Fraw.githubusercontent.com%2Ftbela99%2Fgzip%2Fmaster%2Fgzip.xml) [![Documentation](https://img.shields.io/badge/dynamic/xml?color=green&label=documentation%20version&query=%2Fextension%2Fversion&url=https%3A%2F%2Fraw.githubusercontent.com%2Ftbela99%2Fgzip%2Fmaster%2Fgzip.xml)](https://tbela99.github.io/gzip/) [![Known Vulnerabilities](https://snyk.io/test/github/tbela99/gzip/badge.svg)](https://snyk.io/test/github/tbela99/gzip) [![download from JED](https://img.shields.io/badge/download%20from-JED-blueviolet.svg)](https://extensions.joomla.org/extensions/extension/core-enhancements/performance/gzip/)
![Current version](https://img.shields.io/badge/dynamic/xml?color=green&label=current%20version&query=%2Fextension%2Fversion&url=https%3A%2F%2Fraw.githubusercontent.com%2Ftbela99%2Fgzip%2Fmaster%2Fgzip.xml) [![Documentation](https://img.shields.io/badge/dynamic/xml?color=green&label=documentation&query=%2Fextension%2Fversion&url=https%3A%2F%2Fraw.githubusercontent.com%2Ftbela99%2Fgzip%2Fmaster%2Fgzip.xml)](https://tbela99.github.io/gzip/) [![Known Vulnerabilities](https://snyk.io/test/github/tbela99/gzip/badge.svg)](https://snyk.io/test/github/tbela99/gzip) [![download from JED](https://img.shields.io/badge/download%20from-JED-blueviolet.svg)](https://extensions.joomla.org/extensions/extension/core-enhancements/performance/gzip/)

![logo](./logo.svg)
![logo](./docs/logo.svg)

\*_Make your website blazing fast_.\*
*_Make your website blazing fast_.*

![screenshot](https://raw.githubusercontent.com/tbela99/gzip/master/Capture.PNG)

- It includes a new Css parser
- Automatic critical path css generation which will bring you close to 100 in [lighthouse](https://developers.google.com/web/tools/lighthouse) test with no effort

Here are some features provided by this plugin

## HTML

- HTML minification
- preserve IE conditional comments
- precompress assets using brotli or gzip

## Javascript

Expand All @@ -31,19 +33,20 @@ Here are some features provided by this plugin
- remove files based on a pattern
- async loading
- web fonts preloading
- critical css generation based on provided settings
- automatic critical css generation

## Images

- automatically resize images
- convert to webp
- convert to avif and webp
- generate responsive images
- generate preview images
- lazyloading images
- generate responsive css background images

## Performance

- automatic critical css path generation
- configurable HTTP caching headers
- optimizations are enforced when the client sends [Save-Data HTTP header](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/save-data/)
- dns prefetch
Expand Down
2 changes: 1 addition & 1 deletion docs/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Images that match any pattern you specify here will be ignored. Example: ignore
### Convert Images to Webp

Convert images to Avif and Webp when the support is advertised by the HTTP client.
Avif requires PHP >= 8.1 and GD support
Avif requires PHP >= 8.1 and GD support. If both Avif and Webp are advertised, Avif will be used

### Convert Inline Background

Expand Down
4 changes: 4 additions & 0 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ This plugin has been developed for Joomla version 3 and 4.
- rewrite rules to be enabled in order to work properly
- gd needs to be installed in order to enable image processing
- output_buffering must be enabled in php.ini in order to work properly

### Enabling rewrite rules

please follow [this guide](https://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs#Step_by_Step) to enable rewrite rules on your web server
1 change: 0 additions & 1 deletion gzip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<folder>push</folder>
<folder>vendor</folder>
<filename>autoload.php</filename>
<filename>responder.php</filename>
<filename>helper.php</filename>
<filename>cacert.pem</filename>
<filename>bgstyles.js</filename>
Expand Down
3 changes: 1 addition & 2 deletions helpers/Responder.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('_JEXEC') or die;

/**
* Serve files with cache headers.
*
Expand All @@ -20,6 +18,7 @@
*/

/**
*
* @var $app ;
*/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gzip",
"version": "3.0",
"version": "3.1",
"scripts": {
"build": "./build.sh",
"rollup-config": "./node_modules/rollup/dist/bin/rollup ./config/rollup/rollup.js -f iife --name=rollupConfig > ./rollup.config.js",
Expand Down
Empty file modified vendor/axy/sourcemap/cs.sh
100755 → 100644
Empty file.
Empty file modified vendor/axy/sourcemap/phpmd.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getFallbackDirsPsr4()

/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
* @psalm-return array<string, string>
*/
public function getClassMap()
{
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public static function getRawData()
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
Expand Down Expand Up @@ -337,7 +337,7 @@ private static function getInstalled()
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
Expand Down
2 changes: 0 additions & 2 deletions vendor/composer/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -18,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

10 changes: 10 additions & 0 deletions vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

// autoload_files.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
);
1 change: 1 addition & 0 deletions vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'axy\\codecs\\base64vlq\\' => array($vendorDir . '/axy/codecs-base64vlq'),
'axy\\backtrace\\' => array($vendorDir . '/axy/backtrace'),
'TBela\\CSS\\' => array($vendorDir . '/tbela99/css/src/TBela/CSS'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Peast\\test\\' => array($vendorDir . '/mck89/peast/test/Peast'),
'Peast\\' => array($vendorDir . '/mck89/peast/lib/Peast'),
'Elphin\\IcoFileLoader\\' => array($vendorDir . '/lordelph/icofileloader/src'),
Expand Down
23 changes: 23 additions & 0 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ public static function getLoader()

$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitb332e7a2a50cdb9dc1b66f6e9eb841da::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireb332e7a2a50cdb9dc1b66f6e9eb841da($fileIdentifier, $file);
}

return $loader;
}
}

/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequireb332e7a2a50cdb9dc1b66f6e9eb841da($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}
12 changes: 12 additions & 0 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

class ComposerStaticInitb332e7a2a50cdb9dc1b66f6e9eb841da
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
);

public static $prefixLengthsPsr4 = array (
'a' =>
array (
Expand All @@ -18,6 +22,10 @@ class ComposerStaticInitb332e7a2a50cdb9dc1b66f6e9eb841da
array (
'TBela\\CSS\\' => 10,
),
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
),
'P' =>
array (
'Peast\\test\\' => 11,
Expand Down Expand Up @@ -50,6 +58,10 @@ class ComposerStaticInitb332e7a2a50cdb9dc1b66f6e9eb841da
array (
0 => __DIR__ . '/..' . '/tbela99/css/src/TBela/CSS',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Peast\\test\\' =>
array (
0 => __DIR__ . '/..' . '/mck89/peast/test/Peast',
Expand Down
112 changes: 99 additions & 13 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,30 +263,31 @@
},
{
"name": "mck89/peast",
"version": "v1.13.9",
"version_normalized": "1.13.9.0",
"version": "v1.13.11",
"version_normalized": "1.13.11.0",
"source": {
"type": "git",
"url": "https://github.com/mck89/peast.git",
"reference": "5329e997fb50e0b82ca8f6e4164f92941f689b47"
"reference": "78c57966f3da5f223636ea0417d71ac6ff61e47f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mck89/peast/zipball/5329e997fb50e0b82ca8f6e4164f92941f689b47",
"reference": "5329e997fb50e0b82ca8f6e4164f92941f689b47",
"url": "https://api.github.com/repos/mck89/peast/zipball/78c57966f3da5f223636ea0417d71ac6ff61e47f",
"reference": "78c57966f3da5f223636ea0417d71ac6ff61e47f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"time": "2021-11-12T13:44:49+00:00",
"time": "2022-01-11T17:58:18+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13.9-dev"
"dev-master": "1.13.11-dev"
}
},
"installation-source": "dist",
Expand All @@ -309,32 +310,117 @@
"description": "Peast is PHP library that generates AST for JavaScript code",
"support": {
"issues": "https://github.com/mck89/peast/issues",
"source": "https://github.com/mck89/peast/tree/v1.13.9"
"source": "https://github.com/mck89/peast/tree/v1.13.11"
},
"install-path": "../mck89/peast"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.19.0",
"version_normalized": "1.19.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce",
"reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"time": "2020-10-23T09:01:57+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.19-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"install-path": "../symfony/polyfill-mbstring"
},
{
"name": "tbela99/css",
"version": "dev-php56-backport",
"version_normalized": "dev-php56-backport",
"source": {
"type": "git",
"url": "https://github.com/tbela99/css.git",
"reference": "28e0623998e4ded3d18f8f1dd99586cddc9d0d50"
"reference": "9b268fd5aef73759bbed7d0ef42bc3366e19eb13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tbela99/css/zipball/28e0623998e4ded3d18f8f1dd99586cddc9d0d50",
"reference": "28e0623998e4ded3d18f8f1dd99586cddc9d0d50",
"url": "https://api.github.com/repos/tbela99/css/zipball/9b268fd5aef73759bbed7d0ef42bc3366e19eb13",
"reference": "9b268fd5aef73759bbed7d0ef42bc3366e19eb13",
"shasum": ""
},
"require": {
"axy/sourcemap": "^0.1.5",
"ext-curl": "*",
"ext-json": "*",
"php": ">=5.6"
"ext-mbstring": "*",
"php": ">=5.6",
"symfony/polyfill-mbstring": "1.19.0"
},
"time": "2021-12-24T02:50:23+00:00",
"time": "2022-01-14T01:16:31+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down
Loading

0 comments on commit 810c4a7

Please sign in to comment.