Dr. Roots team,
On a previous thread I threw my rattle out the pram complaining about Sage (once Roots became Sage) because suddenly I had to use Bower and couldnāt do simple things so I threw my rattle out the pram.
After a lot of pain and trial and error I absolutely love it but before making other Devs use Sage I make them use my own āforkā of Sage (Sage but with a few commented out code examples!)
Iāve just had another scan through the documentation and it seems the only examples on what to do with Bower are Austinās Asset Builder documentation - this is a guy who on a Wordpress podcast would happily talk about the Cartesian product and the like (hey, IāM interested but this is WORDPRESS
So like this is how I install Owl Carousel
-
I type in
bower search owl
to a console (because http://bower.io/search/ just never really returns results) -
I pick āowl-carousel2ā (after verifying the URL that itās the correct package)
-
I type
bower install --save owl-carousel2
-
(the hard part) I then add this to Sageās
bower.json
"owl-carousel2":{
"main": [
"dist/owl.carousel.js",
"src/scss/owl.carousel.scss",
"src/scss/owl.autoheight.scss",
"src/scss/owl.animate.scss",
"src/scss/owl.theme.default.scss"
]
}
(correct me as Iām probably wrong) - this overrides everything, but checking that Bower package I then pull all the needed SCSS which Sage automatically injects and now I have a styled and working OWL Carousel
HOW AWESOME IS LIFE WHEN THIS WORKS
This helped me do things like this with Waypoints - pull in sticky.js as well
"overrides": {
...,
"waypoints": {
"main": [
"./lib/jquery.waypoints.js",
"./lib/shortcuts/sticky.js"
]
}
}
(EDIT by @JulienMelissas to include āoverridesā because people were still confused)
I am now the king of Bower!