-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sure how to include with AMD #28
Comments
Oh, I see what's going on. The packaged version defines dependencies like |
And finally the actual, real root cause. Bower is pulling in the dependencies correctly, but the default AMD path doesn't match where bower puts them. What about changing the current define:
Why not change it to this, so that the paths work by default?
|
I recommend setting up paths in your RequireJS config. This allows better flexibility. |
Done, but I've never seen a library require me to config the paths for its dependencies. Looks like this. Have to add a whole section for draggability deps. Smells funny:
|
I agree this is not an ideal solution. We're still working out the best practices with Bower integration with AMD. What would be ideal for you? Using relative paths in the draggabilly source? |
It would be great a version with all dependencies inside it, and another version minified, both would be interesting. |
@andreu86: If you include all the depencencies inside a dependency, this means the client will have to download too much. For example, say that:
and
In a "all dependencies inside it" model, the client would actually have to download jQuery two times. |
I understand your point of view, maybe a Grunt task to generate a full version would be enough, as an extra option. Thanks for replying! |
Yeah, it does smell funny. Have you tried the Bower+RequireJS Grunt task? It might be the missing piece of the puzzle. |
I'm looking for feedback on how to best set up RequireJS dependencies in my components. Help me out! See https://github.com/desandro/requirejs-bower-homework |
draggabilly.pkgd.js is now generated with RequireJS. So you can require the packaged file. Or you can manage dependencies with Bower. See http://draggabilly.desandro.com/#requirejs |
Hi!
I'm working on a transport issue.
When I include draggabilly.js as an AMD dependency, it tries to track down the dependencies of your library in the context of my app. Is this appropriate? Here's the output I see:
I see why this is (the amd define at the bottom of draggabilly indicates those dependencies. What is the right way to resolve this? Should I add require config to map these module names to the correct dependency path? I don't see those dependencies in the draggabilly project.
The text was updated successfully, but these errors were encountered: