Backstretch as normal plugin and also as AMD module. #83

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

skorth commented Nov 29, 2011

Hey there,

as i can see these three lines of code i added just works fine. I tested it as normal plugin and as upcoming amd module.

As normal plugin it still works as usual: $.backstretch(....);

As AMD module within some main.js file:

define('main', ['backstretch'], function(backstretch){
backstretch(....);
});

I hope this works now.

Greets,
Sascha

skorth commented Nov 29, 2011

Possible implementation:

RequireJS as module loader: http://requirejs.org
AMD API: https://github.com/amdjs/amdjs-api/wiki/AMD

skorth commented Dec 3, 2011

Just some other examples:

AMD for zepto: madrobby/zepto#342
AMD for backbone.js: documentcloud/backbone#710

@srobbin srobbin closed this Nov 27, 2012

Owner

srobbin commented Nov 27, 2012

Sorry for not having addressed this long ago. If I'm understanding Require.js correctly, you should just be able to use this via the standard require() dependency call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment