jasonlewis / basset

A better asset management package for Laravel.
http://jasonlewis.me/code/basset
240 stars 76 forks source link

Isn't minifying #208

Open Jaspur opened 11 years ago

Jaspur commented 11 years ago

With the standard php artisan basset:build application --production --force the output isn't minified.

[code]'collections' => array(

    'application' => function($collection)
    {
        // Switch to the stylesheets directory and require the "less" and "sass" directories.
        // These directories both have a filter applied to them so that the built
        // collection will contain valid CSS.
        $directory = $collection->directory('assets/stylesheets', function($collection)
        {
            $collection->requireDirectory('less')->apply('Less');
            $collection->requireDirectory('sass')->apply('Sass');
            $collection->requireDirectory();
        });

        $directory->apply('CssMin'); /// HERE IT'S APPLIED
        $directory->apply('UriRewriteFilter');

        // Switch to the javascripts directory and require the "coffeescript" directory. As
        // with the above directories we'll apply the CoffeeScript filter to the directory
        // so the built collection contains valid JS.
        $directory = $collection->directory('assets/javascripts', function($collection)
        {
            $collection->requireDirectory('coffeescripts')->apply('CoffeeScript');
            $collection->requireDirectory();
        });

        $directory->apply('JsMin'); /// HERE IT'S APPLIED
    },
),

[/code]

LavaToaster commented 11 years ago

Try deleting your manifest then building again.

php artisan basset --delete-manifest
php artisan basset:build