jasonlewis / basset

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

Directory Empty #137

Closed fadillzzz closed 11 years ago

fadillzzz commented 11 years ago

I've just updated Basset to the latest version, and all of a sudden I'm getting the following errors whenever I want to run a command using artisan:

{"error":{"type":"RuntimeException","message":"Directory name must not be empty.","file":"\/var\/www\/hivems\/vendor\/jasonlewis\/basset\/src\/Basset\/Directory.php","line":223}}
jasonlewis commented 11 years ago

If you're able to update can you try updating again. If you can't update (with composer update) remove the Basset service provider from your providers key and try again.

If this doesn't solve your problem please post your collections (all of them).

fadillzzz commented 11 years ago

Ok, I've run composer update and Basset has been updated, but I'm still getting the same error message. I have only one collection, and I believe that it's the default one.

'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('../app/assets/stylesheets', function($collection)
        {
            $collection->requireDirectory('less')->apply('Less');
            $collection->requireDirectory('sass')->apply('Sass');
            $collection->requireDirectory();
        });

        $directory->apply('CssMin');
        $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('../app/assets/javascripts', function($collection)
        {
            $collection->requireDirectory('coffeescripts')->apply('CoffeeScript');
            $collection->requireDirectory();
        });

        $directory->apply('JsMin');
    }

)
jasonlewis commented 11 years ago

This should hopefully be fixed now. Try updating again and let me know how it goes. I'm also recommending that people no longer store their assets outside of public. The default application collection was recently changed.

fadillzzz commented 11 years ago

Sorry it took a while for me to reply, but yes, it's fixed. Thank you very much for the update. I've noted what you said about where to store the assets and I've moved my assets directory into the public one.