vigetlabs / blendid

A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
MIT License
4.97k stars 680 forks source link

JavaScript modules not executing #448

Open mladimatija opened 7 years ago

mladimatija commented 7 years ago

Hi everyone,

I'm having problems getting JS modules to execute. I've followed the outlined examples and created a custom module called menu.js and inserted it as data-module attribute like so <div class="mobile-menu-button" data-module="menu"> but it's not working. I've tried to just alert/console.log something in menu.js and that does not work as well. I did not touch the app.js or index.js file but still doesn't seem to work.

I can see that when I build the project (using Blendid in combination with CraftCMS) that module gets built but it does not execute. Is there some specific way I should be calling/including modules for them to work?

Basically, in this example I want to execute menu.js module when user click on HTML element mentioned above. Here's the full menu.js code:

https://gist.github.com/mladimatija/84956fd9203f283a525a56bc3fbb0c9f

Any help would be greatly appreciated!

Thanks

xavianaxw commented 7 years ago

No errors?

dcw2qq commented 7 years ago

@mladimatija where you able to figure this out? I having the same issue.

gregkohn commented 6 years ago

If you can put this somewhere that I can pull the repo, I can assist in debugging