jlmakes / scrollreveal

Animate elements as they scroll into view.
https://scrollrevealjs.org/
22.34k stars 2.26k forks source link

Run on Electron #401

Closed kanalasumant closed 6 years ago

kanalasumant commented 6 years ago

Thanks for this super cool animation library.

I wanted to ask if anyone could suggest me how to load ScrollReveal on Electron, since Electron doesn't directly support JavaScript. However, that didn't work for me.

Could anyone suggest something to try?

jlmakes commented 6 years ago

Thanks Sumant. I can't say for sure, but I took a look at the blog post. You tried something like this already?

npm install scrollreveal --save
<script>window.ScrollReveal = require('scrollreveal')</script>
kanalasumant commented 6 years ago

Yes. Now it works. Didn't try your method but understood that electron uses node, so commonJS at play here.

Also this worked.