desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 386 forks source link

requirejs support #87

Closed OlegTsarenko closed 9 years ago

OlegTsarenko commented 9 years ago

i try to use draggabilly with requirejs but i get undefined instead object.

require.config({
    paths: {
        jquery: 'bower_components/jquery/dist/jquery',
        underscore: 'bower_components/underscore-amd/underscore',
        draggabilly: 'bower_components/draggabilly/dist/draggabilly.pkgd'
    }
});

requirejs(["jquery","underscore", "draggabilly"],
    function($, _, Draggabilly) {
        console.log('log', $,  _, Draggabilly);
    });

Am I doing something wrong?

requirejs-2.1.0 draggabilly-1.2.3

desandro commented 9 years ago

Thanks for reporting this issue. Previously, draggabilly.pkgd.js exposed a named RequireJS module draggabilly/draggabilly. This has been removed in v1.2.4.

KTamas commented 9 years ago

Would it be possible to put 1.2.4 up on your main website? I spent like 2 hours trying to debug this thing pulling my hair out, until I found this, and then the fact that your website still servers 1.2.3...

desandro commented 9 years ago

Whoa! Sorry about about that. Thanks for pointing it out. Site updated.

KTamas commented 9 years ago

thanks!