umer936/cakephp-asset-compress-yuicompressor

There is no license information available for the latest version (4.0.3) of this package.

See docs for YUI Compressor. This plugin installs YUI Compressor to the proper location for use with markstory/asset_compress CakePHP plugin.

Installs: 35

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 4

Type:cakephp-plugin

4.0.3 2022-09-23 19:30 UTC

This package is auto-updated.

Last update: 2024-04-23 23:05:27 UTC


README

https://github.com/nervo/yuicompressor but puts it in the right place for https://github.com/markstory/asset_compress for CakePHP 4

Installation

Add to composer.json

{
    ...

    "require-dev": {
        ...
        "umer936/cakephp-asset-compress-yuicompressor": "@stable"
    },
    ...
    "scripts": {
        ...
        "post-install-cmd": [
            ...
            "@install-yuicompressor"
        ],
        "post-update-cmd": "@install-yuicompressor",
        ...
        "install-yuicompressor": "CakephpAssetCompressYuicompressor\\Console\\Installer::postUpdate",
        ...
    },
    ...
}

This makes it so it installs both on composer install and composer update.

TODO:

  • In the future, this should check if the file exists and copy the file only if it does not. There's no need to overwrite the yui file if it already exists.