Source files location
Hey folks,
I'm using the package with Bower and I was wondering: is there any particular reason why the source files have the vendor/assets/{x}/bootstrap directory structure? Wouldn't it be more intuitive to have a root bootstrap folder with just javascript, fonts and scss subfolders with the files inside them?
I'm not familiar with the Rails asset pipeline nor with Rake building, so if I'm talking non-sense please forgive me and carry on with the awesome work!
Also, because of the long path name, it's inconvinient to import stylesheets from my source file (for example, @import "vendors/twbs-bootstrap-sass/vendor/assets/stylesheets/bootstrap/close";). A folder structure like the LESS Bootstrap would be more convinient.
It's like this because we couldn't make it work reliably with Rails 3 any other way
@glebm I imagined that. well, nevermind ;)
It's like this because we couldn't make it work reliably with Rails 3 any other way
Is this true? In Rails 4 asset paths are set in an engine initializer, perhaps we could just modify?
initializer :append_assets_path, group: :all do |app|
app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories)
app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories)
app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
end
(too lazy/tired to check for lower versions now, will leave this open and try and push an example branch tomorrow)
I also think it would be better if the sass-port maintains the same folder structure as the normal releases: http://getbootstrap.com/getting-started/#whats-included-source
This port is not only meant for Rails users, right?
We can change this in v4, as we will no longer support Rails 3 by then
+1 on removing the bootstrap part of vendor/assets/{x}/bootstrap paths. Or have separate (eww) paths for Bower vs Rails asset.
This port is not only meant for Rails users, right?
No, but it was originally. Support for other packages has kinda been 'tacked on' since then, hence the (current) folder structure.
Also having a precompiled dist directory like bootstrap-less would be very helpful.
files now in /assets
:boom:
I would again suggest to follow the same structure the less-version does: http://getbootstrap.com/getting-started/#whats-included-source What is the current reason for doing this differently?
bootstrap/
├── scss/
├── js/
├── fonts/
├── dist/
│ ├── css/
│ ├── js/
│ └── fonts/
└── docs/
└── examples/
@marcovtwout
What is the current reason for doing this differently?
- For a compiled version (
dist) you should just use twbs/bootstrap: there is nothing to gain from using this repository apart from the potential compatibility issues. - Assets are scoped under
assetsfor clear separation between the client-side assets and the rest. Non top-level Sass imports are scoped underbootstrap/to avoid name clashes with your own Sass files (e.g. _forms.scss) on import. Non-Sass assets are scoped the same way for consistency. docsare not included yet. If we generate Sass snippets along with LESS for http://getbootstrap.com, perhaps then we will copy docs here as well.
why is the dist/bootstrap folder still there? isnt it obvious that its bootstrap from the package and main level folder?