Whyounes / css-minifier by Whyounes

Simple css minifier for Laravel
56
0
2
Package Data
Maintainer Username: Whyounes
Maintainer Contact: younes.rafie@gmail.com (RAFIE Younes)
Package Create Date: 2014-05-03
Package Last Update: 2014-05-03
Language: CSS
License: Unknown
Last Refreshed: 2024-05-12 03:06:54
Package Statistics
Total Downloads: 56
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Simple css minifier based on GarryJones css minifer.

##Installation

In your composer.json file, require rafie/Cssminifier and run composer dumpautoload.

After the download has finished, in your app/config/app.php you need to:

  • Add Rafie\Cssminifier\CssminifierServiceProvider to the providers array.
  • Add 'CssMin' => 'Rafie\Cssminifier\Facades\CssMin' to the aliases array. ( only if you want to use the static interface CssMin::minify(...) )

##Usage

//through the Ioc

$cssmin = App::make("cssmin");

$cssmin->minify(
  [
    'path/to/file1.css',
    'path/to/file2.css'
  ],
  'output/path',
  true,// (optional) remove comments or no
  false // (optional) concat the resulted files into one file 'all.min.css'
);

//Through the Facade

CssMin::minify(
  [
    'path/to/file1.css',
    'path/to/file2.css'
  ],
  'output/path',
  true,// (optional) remove comments or no
  false // (optional) concat the resulted files into one file 'all.min.css'
);

##TODO write tests