2017 © Pedro Peláez
 

yii2-extension yii2-asset-clean

Yii2 console command to clean web/assets/ directory

image

assayer-pro/yii2-asset-clean

Yii2 console command to clean web/assets/ directory

  • Sunday, January 24, 2016
  • by assayer-pro
  • Repository
  • 2 Watchers
  • 1 Stars
  • 417 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 4 % Grown

The README.md

Yii2 console command to clean web/assets/ directory

This extension added command 'asset/clean' to console application for removes caches from Yii's web/assets/ directory., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

$ composer require assayer-pro/yii2-asset-clean:dev-master

or add, (*4)

"assayer-pro/yii2-asset-clean": "dev-master"

to the require section of your composer.json file., (*5)

Usage

To use this extension, add the following code in your application configuration (console.php):, (*6)

'controllerMap' => [
    'asset' => [
        'class' => 'assayer-pro\assetClean\AssetController',
    ],
],

Then call the extension from the command line, (*7)

/path/yii/web/assets$ ls -l
total 4
lrwxrwxrwx 1 www-data www-data 58 Oct 27 17:49 114607b9 -> /path/yii/vendor/bower/some-package
lrwxrwxrwx 1 www-data www-data 65 Oct 27 17:49 2466e1a -> /path/yii/vendor/bower/some-package2 
lrwxrwxrwx 1 www-data www-data 50 Oct 27 17:49 420da4e -> /path/yii/vendor/yiisoft/yii2/assets
lrwxrwxrwx 1 www-data www-data 55 Oct 27 17:49 85c56229 -> /path/yii/vendor/fortawesome/font-awesome
lrwxrwxrwx 1 www-data www-data 56 Oct 27 17:49 e8db1cdd -> /path/yii/vendor/yiisoft/yii2-debug/assets

/path/yii$ php yii asset/clean
Cleaning assets dir...
removed /path/yii/web/assets/114607b9, last modified Oct 27, 2015, 2:55:06 PM
removed /path/yii/web/assets/2466e1a, last modified Oct 12, 2015, 11:08:59 AM
removed /path/yii/web/assets/420da4e, last modified Mar 30, 2015, 7:50:00 AM
removed /path/yii/web/assets/85c56229, last modified Apr 28, 2015, 4:03:04 PM
removed /path/yii/web/assets/e8db1cdd, last modified Aug 6, 2015, 4:14:06 PM
Done. Assets dir cleaned

For ignore some directories add ignoreDirs property, e.g., (*8)

'controllerMap' => [
    'asset' => [
        'class' => 'assayer-pro\assetClean\AssetController',
        'ignoreDirs' => ['js', 'css'],
    ],
],

Additional arguments

--assetsDir: string (defaults to '@webroot/assets')
  assets cached directory

--quiet: boolean, 0 or 1 (defaults to 0)
  quiet;  do  not  write  anything to standard output.

--verbose: boolean, 0 or 1 (defaults to 0)
  echo rules being run, dir/file being deleted

The Versions

24/01 2016

dev-master

9999999-dev https://github.com/assayer-pro/yii2-asset-clean

Yii2 console command to clean web/assets/ directory

  Sources   Download

MIT

The Requires

 

The Development Requires

24/01 2016

dev-develop

dev-develop https://github.com/assayer-pro/yii2-asset-clean

Yii2 console command to clean web/assets/ directory

  Sources   Download

MIT

The Requires

 

The Development Requires

24/01 2016
28/10 2015
27/10 2015

1.0.2

1.0.2.0 https://github.com/assayer-pro/yii2-asset-clean

Yii2 Yii2 console command to clean web/assets/ directory

  Sources   Download

MIT

The Requires

 

The Development Requires

27/10 2015

1.0.1

1.0.1.0 https://github.com/assayer-pro/yii2-asset-clean

Yii2 Yii2 console command to clean web/assets/ directory

  Sources   Download

MIT

The Requires

 

The Development Requires

27/10 2015

1.0.0

1.0.0.0 https://github.com/assayer-pro/yii2-asset-clean

Yii2 Yii2 console command to clean web/assets/ directory

  Sources   Download

MIT

The Requires

 

The Development Requires