Skip to content

Instantly share code, notes, and snippets.

@rememberlenny
Last active December 14, 2015 23:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rememberlenny/5164200 to your computer and use it in GitHub Desktop.
Save rememberlenny/5164200 to your computer and use it in GitHub Desktop.
Main.js file from Require.js on Foundation 4 through Yeoman.
require.config({
paths: {
jquery: '../components/jquery/jquery'
},
shim: {
"foundation/foundation" : { deps: ["jquery"] },
"foundation/foundation.alerts": { deps: ["jquery"] },
"foundation/foundation.clearing": { deps: ["jquery"] },
"foundation/foundation.cookie": { deps: ["jquery"] },
"foundation/foundation.dropdown": { deps: ["jquery"] },
"foundation/foundation.forms": { deps: ["jquery"] },
"foundation/foundation.joyride": { deps: ["jquery"] },
"foundation/foundation.magellan": { deps: ["jquery"] },
"foundation/foundation.orbit": { deps: ["jquery"] },
"foundation/foundation.placeholder": { deps: ["jquery"] },
"foundation/foundation.reveal": { deps: ["jquery"] },
"foundation/foundation.section": { deps: ["jquery"] },
"foundation/foundation.tooltips": { deps: ["jquery"] },
"foundation/foundation.topbar": { deps: ["jquery"] }
}
});
require(["jquery",
"foundation/foundation",
"foundation/foundation.alerts",
"foundation/foundation.clearing",
"foundation/foundation.cookie",
"foundation/foundation.dropdown",
"foundation/foundation.forms",
"foundation/foundation.joyride",
"foundation/foundation.magellan",
"foundation/foundation.orbit",
"foundation/foundation.placeholder",
"foundation/foundation.reveal",
"foundation/foundation.section",
"foundation/foundation.tooltips",
"foundation/foundation.topbar"
], function ($) {
$(document).foundation();
});
@rememberlenny
Copy link
Author

If someone knows how to integrate Zepto properly, please contact me @lkbcc

@tysonnero
Copy link

Here is a possible solution for conditionally referencing Zepto or jQuery:
requirejs/requirejs#451

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