Skip to content

Instantly share code, notes, and snippets.

@remybach
Last active December 11, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remybach/4585929 to your computer and use it in GitHub Desktop.
Save remybach/4585929 to your computer and use it in GitHub Desktop.
Making Konami JS (http://snaptortoise.com/konami-js) a RequireJS (http://requirejs.org) compatible module. Simply add the below to the bottom of your konami js file.
// Export this as a module for RequireJS
typeof define === "function" && define([], function() { return Konami; });
@jackfranklin
Copy link

I think you only want:

define([], function() { return Konami; });

The first argument is an array of dependencies, and as far as I can see this doesn't have any.

@remybach
Copy link
Author

Doh... I'm a bit of RequireJS noob (started using it today for the first time).

Thanks for the help :)

@remybach
Copy link
Author

Just submitted this as a pull request so hopefully it'll be part of Konami JS soon :)

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