bootstrap-sass icon indicating copy to clipboard operation
bootstrap-sass copied to clipboard

Source files location

Open stefanotorresi opened this issue 12 years ago • 13 comments

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!

stefanotorresi avatar Feb 21 '14 11:02 stefanotorresi

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.

phuvo avatar Feb 23 '14 18:02 phuvo

It's like this because we couldn't make it work reliably with Rails 3 any other way

glebm avatar Feb 23 '14 19:02 glebm

@glebm I imagined that. well, nevermind ;)

stefanotorresi avatar Feb 24 '14 09:02 stefanotorresi

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)

thomas-mcdonald avatar Feb 26 '14 00:02 thomas-mcdonald

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?

marcovtwout avatar Apr 30 '14 13:04 marcovtwout

We can change this in v4, as we will no longer support Rails 3 by then

glebm avatar May 01 '14 06:05 glebm

+1 on removing the bootstrap part of vendor/assets/{x}/bootstrap paths. Or have separate (eww) paths for Bower vs Rails asset.

eddiemonge avatar May 06 '14 23:05 eddiemonge

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.

thomas-mcdonald avatar May 18 '14 21:05 thomas-mcdonald

Also having a precompiled dist directory like bootstrap-less would be very helpful.

marcovtwout avatar May 22 '14 14:05 marcovtwout

files now in /assets

:boom:

thomas-mcdonald avatar Jun 26 '14 22:06 thomas-mcdonald

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 avatar Jun 30 '14 08:06 marcovtwout

@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 assets for clear separation between the client-side assets and the rest. Non top-level Sass imports are scoped under bootstrap/ 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.
  • docs are not included yet. If we generate Sass snippets along with LESS for http://getbootstrap.com, perhaps then we will copy docs here as well.

glebm avatar Jun 30 '14 14:06 glebm

why is the dist/bootstrap folder still there? isnt it obvious that its bootstrap from the package and main level folder?

eddiemonge avatar Jun 30 '14 17:06 eddiemonge