Skip to content
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

Compatibility with AMD loaders like Require.js #36

Open
rawberg opened this issue Dec 28, 2011 · 3 comments
Open

Compatibility with AMD loaders like Require.js #36

rawberg opened this issue Dec 28, 2011 · 3 comments

Comments

@rawberg
Copy link

rawberg commented Dec 28, 2011

I started using Stativus on a Backbone project that also uses require.js. I just wrapped everything in a define function but it would be great if there was native support for using AMD loaders.

@rawberg
Copy link
Author

rawberg commented Jan 31, 2012

This is my quick take on it. It works for a project using all modules. You'll probably want to follow a pattern that also allows for globals if AMD isn't present like this one. More useful patterns are here.

@reedspool
Copy link

I am successfully using a require.js shim configuration like so:

require.config({
    paths: {
        stativus: 'stativus-full'
    },
    shim: {
        stativus: {
            exports: 'Stativus'
        }
    }
});

Does anyone have a better working flow currently for require.js or other AMD?

@jeffrose
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants