Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding ZyngaScroller AMD module which handles the configuration

and dependency resolution of the zynga src files
  • Loading branch information...
commit eb665bd9a345491c14d0c82cf9c129474e5b9470 1 parent 97431a7
Taka Kojima authored
View
9 red/modules/scroller/Scroller.js
@@ -29,14 +29,9 @@
// });
define([
"../Module",
- // we don't need an AMD reference to the scroller file,
- // but we do need it to be included in the build
- /*global Scroller */
- "./zynga/src/Scroller",
- "./zynga/src/Raf",
- "./zynga/src/Animate"
+ "./zynga/ZyngaScroller"
],
- function (Module) {
+ function (Module, Scroller) {
// Extends red.Module
return Module.extend({
View
20 red/modules/scroller/zynga/ZyngaScroller.js
@@ -0,0 +1,20 @@
+require.config({
+ shim : {
+ "red/modules/scroller/zynga/src/Scroller" : {exports : "Scroller"},
+ "red/modules/scroller/zynga/src/Raf" : ["red/modules/scroller/zynga/src/Scroller"],
+ "red/modules/scroller/zynga/src/Animate" : ["red/modules/scroller/zynga/src/Raf"]
+ }
+});
+
+define(
+
+ [
+ "./src/Scroller",
+ "./src/Raf",
+ "./src/Animate"
+ ],
+
+ function (Scroller) {
+ return Scroller;
+ }
+);
Please sign in to comment.
Something went wrong with that request. Please try again.