Permalink
Browse files

Adding ZyngaScroller AMD module which handles the configuration

and dependency resolution of the zynga src files
  • Loading branch information...
1 parent 97431a7 commit eb665bd9a345491c14d0c82cf9c129474e5b9470 Taka Kojima committed Jul 2, 2012
Showing with 22 additions and 7 deletions.
  1. +2 −7 red/modules/scroller/Scroller.js
  2. +20 −0 red/modules/scroller/zynga/ZyngaScroller.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({
@@ -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;
+ }
+);

0 comments on commit eb665bd

Please sign in to comment.