So I am trying desperately to figure out how to add and control packages in roots.io/sage.
The environment is up and running (trellis and all), and my theme loads perfectly. I decided that I wanted to update bootstrap to alpha6 and to newest jquery. I believe these are the steps (for any new javascript library) would be.
- Use Bower to install the package (with --save)
bower --save install bootstrap@4.0.0-alpha.6
This adds the following to bower.json in the theme directory (root level, same as base.php), and as I only want the package, I don't think I need overrides?
"dependencies": {
"bootstrap": "4.0.0-alpha.6",
Add the bower package to manifest.json
"jquery.js": { "bower": ["jquery"] }, "bootstrap.js": { "bower": ["bootstrap"] }
This is where I get really curious, how do I now tell base.php to load it. The page loads OK, but it loads jquery v1.12.4. And I can't see a single line that tells base.php what to load where. Is the autoloader so efficient that it should figure out how to add CSS and JS files, or is it the overrides that does the magic?
What am I missing a really obvious step?