Sage, assets folder structure different to paths set in bower.js

In the bower.js file I see the following:

"overrides": { "bootstrap-sass": { "main": [ "./assets/stylesheets/_bootstrap.scss", "./assets/javascripts/bootstrap/transition.js", "./assets/javascripts/bootstrap/alert.js", "./assets/javascripts/bootstrap/button.js", "./assets/javascripts/bootstrap/carousel.js", "./assets/javascripts/bootstrap/collapse.js", "./assets/javascripts/bootstrap/dropdown.js", "./assets/javascripts/bootstrap/modal.js", "./assets/javascripts/bootstrap/tooltip.js", "./assets/javascripts/bootstrap/popover.js", "./assets/javascripts/bootstrap/scrollspy.js", "./assets/javascripts/bootstrap/tab.js", "./assets/javascripts/bootstrap/affix.js", "./assets/fonts/bootstrap/glyphicons-halflings-regular.eot", "./assets/fonts/bootstrap/glyphicons-halflings-regular.svg", "./assets/fonts/bootstrap/glyphicons-halflings-regular.ttf", "./assets/fonts/bootstrap/glyphicons-halflings-regular.woff", "./assets/fonts/bootstrap/glyphicons-halflings-regular.woff2" ] },

But, the folder structure for assets is like so:

`assets
├── fonts
├── images
├── manifest.json
├── scripts
│ ├── customizer.js
│ └── main.js
└── styles
├── common
│ ├── _global.scss
│ └── _variables.scss
├── components
│ ├── _buttons.scss
│ ├── _comments.scss
│ ├── _forms.scss
│ ├── _grid.scss
│ └── _wp-classes.scss
├── layouts
│ ├── _footer.scss
│ ├── _header.scss
│ ├── _pages.scss
│ ├── _posts.scss
│ ├── _sidebar.scss
│ └── _tinymce.scss
└── main.scss

`

Why does the folder structure differ? Shouldn’t the paths in the bower file match the folder structure of assets?

Bower is a package manager. The paths you see in bower.js are relative to the directory of the dependency in the bower_components folder, not Sage’s own assets folder:

e.g. bower_components/bootstrap-sass/assets/stylesheets/_bootstrasp.scss.

@foxaill after much confusion I finally understood the overrides part :slight_smile: I’ve never used bower and didn’t understand what overrides was being used for. It all makes sense now thank you.