Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating when css and js in same folder #207

Open
mzf opened this issue Sep 27, 2013 · 1 comment
Open

Generating when css and js in same folder #207

mzf opened this issue Sep 27, 2013 · 1 comment

Comments

@mzf
Copy link

mzf commented Sep 27, 2013

I use this code

$collection->directory('assets', function($collection)
            {
                $collection->directory('admin/plugins', function($collection)
                    {
                        $collection->stylesheet('bootstrap/css/bootstrap.min.css');
                        $collection->stylesheet('bootstrap/css/bootstrap-responsive.min.css');
                        $collection->stylesheet('font-awesome/css/font-awesome.min.css');                     
                    })->apply('UriRewriteFilter')->apply('CssMin');

                $collection->directory('admin/plugins', function($collection)
                    {
                        $collection->javascript('jquery-1.10.1.min.js');
                        $collection->javascript('jquery-migrate-1.2.1.min.js');
                        $collection->javascript('jquery-ui/jquery-ui-1.10.1.custom.min.js');                        
                    })->apply('JsMin');
            });

After running php artisan basset:build -f
[admin_test]←[Stylesheets build was not require [admin_test]←[Javascripts successfully built.
i have only js files in compiled directory. No one css.
Then when i do

 $collection->directory('assets', function($collection)
            {
                $collection->directory('admin/plugins', function($collection)
                    {
                        $collection->stylesheet('bootstrap/css/bootstrap.min.css');
                        $collection->stylesheet('bootstrap/css/bootstrap-responsive.min.css');
                        $collection->stylesheet('font-awesome/css/font-awesome.min.css');                     
                    })->apply('UriRewriteFilter')->apply('CssMin');

                $collection->directory('admin', function($collection)
                    {
                        $collection->javascript('plugins/jquery-1.10.1.min.js');
                        $collection->javascript('plugins/jquery-migrate-1.2.1.min.js');
                        $collection->javascript('plugins/jquery-ui/jquery-ui-1.10.1.custom.min.js');                        
                    })->apply('JsMin');
            });        

JS and CSS both successfully created and
←[admin_test]←[Stylesheets successfully built. ←[admin_test]←[Javascripts successfully built.

When using js plugins, files of different types often are in one folder and it is necessary to use way change for normal generation.
I think such behavior is wrong

@yunidbauza
Copy link

I'm having exactly the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants