braincrafted / bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.
http://bootstrap.braincrafted.com
MIT License
399 stars 182 forks source link

bootstrap.less.twig and other web resouces #219

Closed nonlux closed 10 years ago

nonlux commented 10 years ago

May be remove bootstrap.less.twig and this route? We can manipulate it with hardcore assetic link. As like my assetic config. This comfig we can create dynamic. Also with this feature we can support bowler for download web resources (css, js ).

sstok commented 10 years ago

Its not like you "must" use it, I'm actually not using it as I'm installing Bootstrap using Bower. You can choose to use it or not.

nonlux commented 10 years ago

I agree with you. But this is the default behavior in Getting Started May be set bower as default package manager resources?

florianeckerstorfer commented 10 years ago

1) How can you adapt bootstrap.less only with Assetic configuration? Is see no way to import custom Less files in your setup. bootstrap.less.twig mainly exists to load a custom variables.less file.

2) As mentioned by @sstok you can use Bower to download resources. I choose to use Composer as default way of downloading the assets in the Getting Started guide because everyone reading the guide should already be familiar with the tool and has it installed. Bootstrap is officially on Packagist, so it's no weird third party hack like components and always up to date.

In fact, in my latest project I am using BootstrapBundle with Bower+Grunt.js (no Assetic involved) and it works great.

The Getting Started guide tries really to be the easiest way to get the bundle running. There is a note that Bower can be used but maybe it's a bit small. I will try to update the guide in the future to make it more clear that you can use Bower instead of Composer and Grunt (or Gulp or Broccoli or whatever) instead of Assetic.

nonlux commented 10 years ago

@florianeckerstorfer 1) If I think if you using less.js, you don't need to support base symfony routing for change bootstrap. As example i create my "endpoint" (bootstrap.less) and dump all less files in public/less or MyBundle/Resources/public/less (with assetic) If I you compile less with assetic routing not need too. 2)If you use asstic and less you has "nmp less" already. Because phpless working with some bugs. No problem to setup addition nmp module. Realy, I would suggest to implement dynamic connection resources with assetic and bower. But assessing the implementation, I came to the conclusion that it is rather a feature for assitic or other bundle. And I found it Thank for discussion.

florianeckerstorfer commented 10 years ago

@nonlux

  1. I don't get what bootstrap.less has to do with Symfony routing.
  2. Again Bower has nothing to do with Assetic. BootstrapBundle does not really care if you use Composer, Bower or manually download the Bootstrap asset files. It also does not care if you use Assetic, Grunt or manually compile the Less files.

Are you just talking about the default configuration? Currently the default Assetic configuration provided by the bundle assumes that you download Bootstrap using Composer. There has been a discussion when this first was implemented whether to use Composer, Bower or something else and we settled on Composer because it's the most common tool in the Symfony world. We can assume that everyone using, but only a small percentage is using Bower. Maybe at some point BootstrapBundle can support Bower configuration for Assetic optionally, but the default will be Composer.

florianeckerstorfer commented 10 years ago

I reread your comment and maybe I get it now. Do you want to use less.js in the browser? Why would you want to do that? I never got why this is possible in the first place because it seems really useless.

nonlux commented 10 years ago

@florianeckerstorfer Sorry, I was not attentive. Yes, I like to use less.js in browser, becauses it easy to debug less styles. About bootstrap.less.twig I am wrong )