2017 © Pedro Peláez
 

cakephp-plugin minicake

Cakeminify plugin for CakePHP 3

image

dariob/minicake

Cakeminify plugin for CakePHP 3

  • Sunday, June 10, 2018
  • by dariob
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Cakeminify plugin for CakePHP

combine and compress your web asset resource in cakephp3+, (*1)

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require dariob/minicake

Load plugin in bootstrap.php, (*4)

Plugin::load('Cakeminify');

Config

config your asset resource, create a config file named minify.php in config directory。 or use Cake/Configure class to set minify configuration in bootstrap.php, (*5)

return[
    'minjs'=>[
       'source'=>[
           '/asset/jquery/dist/jquery.js',
           '/asset/zui/dist/js/zui.js',
           '/asset/vue/dist/vue.js'
       ],
       'desc'=>'/dist/main.js'
    ],
    'mincss'=>[
       'source'=>[
           '/asset/zui/dist/css/zui.css',
           '/css/view.css',
       ],
       'desc'=>'/dist/default.css'
    ],

];

shell

combine and compress, (*6)

bin/cake minify start

the combine file will create in your 'desc' config, (*7)

helper

call the helper function in your template, (*8)

  <?= $this->minify->generateAsset() ?>

output

output is relation to the debug level, (*9)

Production Mode:, (*10)

<link rel="stylesheet" href="/dist/default.css"/>
<script src="/dist/main.js"></script>

Development Mode:, (*11)

<link rel="stylesheet" href="/asset/zui/dist/css/zui.css"/>
<link rel="stylesheet" href="/css/view.css"/>
<script src="/asset/jquery/dist/jquery.js"></script>
<script src="/asset/zui/dist/js/zui.js"></script>
<script src="/asset/vue/dist/vue.js"></script>

The Versions

10/06 2018

dev-master

9999999-dev

Cakeminify plugin for CakePHP 3

  Sources   Download

The Requires

 

The Development Requires

10/06 2018

0.2.0

0.2.0.0

Cakeminify plugin for CakePHP 3

  Sources   Download

The Requires

 

The Development Requires

04/03 2017

0.1.3

0.1.3.0

Cakeminify plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires

19/02 2017

0.1.2

0.1.2.0

Cakeminify plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires

18/02 2017

0.1.1

0.1.1.0

Cakeminify plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires

18/02 2017

0.1.x-dev

0.1.9999999.9999999-dev

Cakeminify plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires

18/02 2017

0.1.0

0.1.0.0

Cakeminify plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires