Help to include bower components "smartmenus"

Hi everyone,
I have installed the Jquery SmartMenus component (www.smartmenus.org) with Bower (see attached image, A/B).

Sage correctly include in dist/script/main.js the component js file jquery.smartmenus.js (see image, letter C).

Now i need to use in my project also this two files (see image letter D):

  • jquery.smartmenus.bootstrap.css
  • jquery.smartmenus.bootstrap.js

How can I do?

Hi!

You can override the ‘main’ files that bower installs and specify them yourself by adding something like this to your bower.json file:

...
"overrides": {
  "smartmenus": {
    "main": [
        "./src/addons/bootstrap/jquery.smartmenus.bootstrap.css",
        "./src/addons/bootstrap/jquery.smartmenus.bootstrap.js",
        "./src/jquery.smartmenus.js"
    ]
  }
}
...

Similar to how Sage installs Bootstrap: https://roots.io/using-bootstrap-with-bower-how-to-override-bower-packages/

2 Likes

Thanks @connormfreeman. It works!