2017 © Pedro Peláez
 

cakephp-plugin assetic

Assetic for CakePHP 3

image

gourmet/assetic

Assetic for CakePHP 3

  • Wednesday, November 26, 2014
  • by jadb
  • Repository
  • 1 Watchers
  • 5 Stars
  • 175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Assetic for CakePHP

Built to seamlessly integrate Assetic with CakePHP., (*1)

This is an unstable repository and should be treated as an alpha., (*2)

UPDATE: Now that @mark_story has released markstory/asset_compress, I have stopped actively developing this plugin., (*3)

Install

composer require gourmet/assetic:*

or by adding this package to your project's composer.json:, (*4)

"require": {
    "gourmet/assetic": "*"
}

Usage

The AsseticHelper methods work somewhat like their HtmlHelper counter-parts but with some added options., (*5)

The methods are:, (*6)

  • css($path, $options)
  • image($path, $options)
  • script($url, _$options)

The added $options keys are:, (*7)

  • debug: boolean Defaults to app's configuration debug value.
  • output: string Name of the Assetic created asset.
  • filters: array|string Filter(s) to use. Defaults to the configured filters for the asset type (css, image, js).

The $path passed to css() and the $url passed to script can be passed as a string or as an associative array (see examples below)., (*8)

Examples

echo $this->Assetic->css('cake.generic', ['debug' => false, 'filters' => 'cssmin']);
echo $this->Assetic->css(['cake.generic' => 'cssmin'], ['debug' => false]);
echo $this->Assetic->css('cake.generic');

All the above examples will have the same result, including the minified version of cake.generic.css. For the last example, it is assumed that the value of the Assetic.cssFilters configuration contains at least the cssmin key., (*9)

$this->Assetic->css('cake.generic', ['filters' => 'cssmin,?uglify']);

In the above example, when in debug mode, only the cssmin filter will be run., (*10)

The Versions

26/11 2014

dev-master

9999999-dev http://github.com/gourmet/assetic

Assetic for CakePHP 3

  Sources   Download

MIT

The Requires

 

cakephp assetic

15/08 2014

0.2.3

0.2.3.0 http://github.com/gourmet/assetic

Assetic for CakePHP 3

  Sources   Download

MIT

The Requires

 

cakephp assetic

23/07 2014

0.2.2

0.2.2.0 http://github.com/gourmet/assetic

Assetic for CakePHP 3

  Sources   Download

MIT

The Requires

 

cakephp assetic

24/06 2014

0.2.0

0.2.0.0 http://github.com/gourmet/assetic

Assetic for CakePHP 3

  Sources   Download

MIT

The Requires

 

cakephp assetic

13/05 2014

0.1.0

0.1.0.0 http://github.com/gourmet/assetic

Assetic for CakePHP 3

  Sources   Download

MIT

The Requires

 

cakephp assetic