PHPackages                             processfast/yii2-minify-view - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. processfast/yii2-minify-view

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

processfast/yii2-minify-view
============================

Modification of rmrevin/yii-2-minify-view lib to allow minification of css &amp; js in a load balanced environment

1.18.2(4y ago)010.9k1[1 PRs](https://github.com/ProcessFast/yii2-minify-view/pulls)MITPHP

Since May 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/ProcessFast/yii2-minify-view)[ Packagist](https://packagist.org/packages/processfast/yii2-minify-view)[ RSS](/packages/processfast-yii2-minify-view/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (66)Used By (0)

Yii 2 Minify View Component
===========================

[](#yii-2-minify-view-component)

Purpose of the Yii2 extension
-----------------------------

[](#purpose-of-the-yii2-extension)

The main feature of this component is to concatenate and compress \[GZIP\] JS and CSS files listed in "AssetBundle" and allow application an option to upload them to AWS S3 bucket directly from minify folder on file generation.And present copressed files from S3 bucket to browser. Concatenation and compression of all files will be done on first time loading after deployment, for all the next requests assets will only be requested from S3 bucket.Optionally console request can also be sent to have all the assets coming from S3 bucket directly. Console request must be part of continuous deployment script.

Required to work accurately
---------------------------

[](#required-to-work-accurately)

- It works with layouts. For instance different layouts can have different JS &amp; CSS files which can be listed in different AssetBundle.
- There should be only one main AssetBundle which has all other asset bundles as dependecies. [Please check here how I have managed my assets.](https://github.com/ProcessFast/yii2-minify-view#my-asset-bundles-dependencies)
- All JS &amp; CSS files \[ mostly JS pluggins \] used in particular layout whether it belongs to a particular page which only required on widget initialization must be also added at in the main Asset file under dependency.

[![License](https://camo.githubusercontent.com/f9cae341a875d3137c9a717cc306b033a2d53a8a79d33c87d6fd369d978e2692/68747470733a2f2f706f7365722e707567782e6f72672f70726f63657373666173742f796969322d6d696e6966792d766965772f6c6963656e73652e737667)](https://packagist.org/packages/processfast/yii2-minify-view)[![Latest Stable Version](https://camo.githubusercontent.com/efd2d428f40bb74ce10c733cf42324dfb1871cec829321d87e9dca71c15dab63/68747470733a2f2f706f7365722e707567782e6f72672f70726f63657373666173742f796969322d6d696e6966792d766965772f762f737461626c652e737667)](https://packagist.org/packages/processfast/yii2-minify-view)[![Latest Unstable Version](https://camo.githubusercontent.com/5dd41bdc7fcc76e9c0782c6e6b187a3465531b1e70e6b99ffdb7a67154e00017/68747470733a2f2f706f7365722e707567782e6f72672f70726f63657373666173742f796969322d6d696e6966792d766965772f762f756e737461626c652e737667)](https://packagist.org/packages/processfast/yii2-minify-view)[![Total Downloads](https://camo.githubusercontent.com/4e644e30c69ee2d950aa5e75e39546d55c7adbb957910a78650bb0f8baeaa516/68747470733a2f2f706f7365722e707567782e6f72672f70726f63657373666173742f796969322d6d696e6966792d766965772f646f776e6c6f6164732e737667)](https://packagist.org/packages/processfast/yii2-minify-view)

Code Status
-----------

[](#code-status)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/78fc5ec8f22af3289a545fd00c4c5f34a6939bae06770364b3b094beb0cb5596/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f50726f63657373466173742f796969322d6d696e6966792d766965772f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ProcessFast/yii2-minify-view/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/2e83094c64110de0d32541e4da57c87d2a38bbe9d7daf9594fa07fdce32f0c89/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f50726f63657373466173742f796969322d6d696e6966792d766965772f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ProcessFast/yii2-minify-view/?branch=master)[![Travis CI Build Status](https://camo.githubusercontent.com/f26d6364783014b1b49f47eda93233fadfebf1b2f6fe022f60f486bf196eb1db/68747470733a2f2f7472617669732d63692e6f72672f50726f63657373466173742f796969322d6d696e6966792d766965772e737667)](https://travis-ci.org/ProcessFast/yii2-minify-view)

Support
-------

[](#support)

[GitHub issues](https://github.com/ProcessFast/yii2-minify-view/issues)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/).

Either run

```
composer require "processfast/yii2-minify-view:~1.18"
```

or add

```
"processfast/yii2-minify-view": "~1.18",

```

to the `require` section of your `composer.json` file.

Configure
---------

[](#configure)

```
