From 1d5357e0f0f0bf46ecc9167ac78eb3b148842514 Mon Sep 17 00:00:00 2001 From: michalsn Date: Thu, 21 Oct 2021 20:19:54 +0200 Subject: [PATCH] release preparation --- CHANGELOG.md | 4 ++++ README.md | 21 ++++----------------- composer.json | 11 ++++++----- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b8860..5242b9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [1.3.0] - 2021-10-21 +### Added +- New config variables `$dirMinJs` and `$dirMinCss` that allow to specify separate directories for minified assets - by [@daycry](https://github.com/daycry) + ## [1.2.0] - 2021-01-01 ### Added - New config variable `$autoDeployOnChange` that specifies if we want to make a deploy automatically whenever any change happens to our assets files. Thanks to [@paul45](https://github.com/paul45) for inspiration. diff --git a/README.md b/README.md index fa52e74..fea8c5d 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,10 @@ Asset minification and versioning library for CodeIgniter 4. -## Installation via composer +## Installation > composer require michalsn/minifier -## Manual installation - -Download this repo and then enable it by editing **app/Config/Autoload.php** and adding the **Michalsn\Minifier** -namespace to the **$psr4** array. For example, if you copied it into **app/ThirdParty**: - -```php -$psr4 = [ - 'Config' => APPPATH . 'Config', - APP_NAMESPACE => APPPATH, - 'App' => APPPATH, - 'Michalsn\Minifier' => APPPATH . 'ThirdParty/minifier/src', -]; -``` ## Configuration Run command: @@ -26,7 +13,7 @@ Run command: > php spark minify:publish This command will copy a config file to your app namespace. -Then you can adjust it to your needs. By default file will be present in `app/Config/Minifier.php`. +Then you can adjust it to your needs. By default, file will be present in `app/Config/Minifier.php`. You should define an array of files that you want to minify, ie: @@ -104,8 +91,8 @@ Variable | Default value | Options | Desctiption `$adapterCss` | `\Michalsn\Minifier\Adapters\Css\MinifyAdapter::class` | | Adapter to use for minifying CSS files. You can also implement your own CSS adapter to minify assets and replace this class. `$dirJs` | `./assets/js` | | JS assets directory. `$dirCss` | `./assets/css` | | CSS assets directory. -`$dirMinJs` | `null` | | Minified JS Asset Directory. -`$dirMinCss` | `null` | | Minified CSS Asset Directory. +`$dirMinJs` | `null` | | Minified JS asset directory. If not set the value from `$dirJs` will be used instead. +`$dirMinCss` | `null` | | Minified CSS asset directory. If not set the value from `$dirCss` will be used instead. `$dirVersion` | `./assets` | | Directory to store assets versioning. `$tagJs` | `` | | JS tag to use in HTML when displaying JS assets. `$tagCss` | `` | | CSS tag to use in HTML when displaying CSS assets. diff --git a/composer.json b/composer.json index f31d16b..bdd9b5d 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,14 @@ ], "license": "MIT", "require": { - "php" : ">=7.2", - "matthiasmullie/minify": "^1.3" + "php" : ">=7.3", + "matthiasmullie/minify": "^1.3", + "ext-json": "*" }, "minimum-stability": "dev", "require-dev": { - "phpunit/phpunit" : "8.5.*", - "codeigniter4/framework": "^4.0.2" + "phpunit/phpunit" : "^8.5", + "codeigniter4/framework": "^4.1" }, "autoload": { "psr-4": { @@ -38,4 +39,4 @@ "@composer dump-autoload" ] } -} \ No newline at end of file +}