New bower packages not being included in main.js or anywhere

Hi there,
I am trying to install a bower package to be used with the theme, so just usual and mentioned in the docs I ran bower install ... --save but now the necessary are not added into the main.js like it says in the docs.
The package (GitHub - IanLunn/jQuery-Parallax: **NO LONGER MAINTAINED** Used to recreate the Nike Better World parallax effect) has a main file declared in its own bower.json and everything but I just don’t understand why the asset-builder or whatever’s responsible for that is not processing the file…
Oh and I am running windows, just mentioning that because I read somewhere there are problems with the asset-builder under windows?

Did you run gulp after installing the package with bower install?

Yes, but I still cannot access the parallax plugin…

What do you mean “access”? Is there an error in your console?

Yes, I can’t run .parallax() on any element for example. I just seems like any bower packages besides jQuery and Modernizr are not added via wiredep or whatever

So, again, are there any errors or messages in your browser console?

Yes, parallax() is not a function

the issue is in the bower.json file of the package. this line is referencing the wrong file. it says jquery.parallax.js but it should say jquery.parallax-1.1.3.js as that is the name of the file in the package. you can override the bower.json file of the package if your theme bower.json:

"jquery-parallax": {
  "main": [
    "./scripts/jquery.parallax-1.1.3.js"
  ]
}

jQuery is also a dependency for the plugin but i didn’t include it because i assume you already have it via google CDN.

edit: there is no need to list the dependencies in the override. sorry i copied the wrong code.

3 Likes

Dang, someone needs to send that guy a PR for his bower.json file. Good catch @slobich

2 Likes

Oh yes, I checked the file but didn’t see that little error. Thanks for that!

1 Like