miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.68k stars 299 forks source link

Unable to require this library #260

Closed pkid169 closed 6 years ago

pkid169 commented 6 years ago

After running npm install --save justifiedGallery, I was unable to load the lib by doing require('justifiedGallery'). Is using <script src="path/to/justifiedGallery.js"> the only way to load it?

miromannino commented 6 years ago

This is a change that I will do in the immediate future. It's a shame that in 2018 there is no support for AMDs still here. But I had a very turbolent 2017 and I couldn't to anything with Justified Gallery. I'll update you soon on this.

ericnewton76 commented 6 years ago

@miromannino Hey, I'm interested in helping adjust this from AMD to ES6/CommonJS. We can still produce a build that uses a universal module adapter via factory as well.

What plans have you considered?

miromannino commented 6 years ago

@ericnewton76 thanks for offering!

I already done. It's already in master. Under test folder you can find examples for AMD, Browserify and I will put webpack example today/tomorrow. I will release this as 3.7 in the next days.

miromannino commented 6 years ago

3.7.0 now should solve this. Tell me if you have any problem with this. Thanks