Skip to content

Instantly share code, notes, and snippets.

@rgstephens
Last active August 29, 2015 14:08
Show Gist options
  • Save rgstephens/e72cb37e64590333944c to your computer and use it in GitHub Desktop.
Save rgstephens/e72cb37e64590333944c to your computer and use it in GitHub Desktop.
Add foundation to main.js from Yeoman generator-backbone
require.config({
paths: {
jquery: '../bower_components/jquery/dist/jquery',
backbone: '../bower_components/backbone/backbone',
underscore: '../bower_components/lodash/dist/lodash',
foundation: '../bower_components/foundation/js/foundation',
app: 'app',
indexView: 'views/index'
},
shim: {
foundation: {
deps: ['jquery'],
exports: 'foundation'
}
}
});
require(['backbone', 'app', 'jquery', 'foundation'], function (Backbone, app, $, foundation) {
'use strict';
var router = new app();
Backbone.history.start();
// use app here
//console.log(app);
console.log('Running jQuery %s', $().jquery);
$(document).ready(function() {
console.log('document load foundation');
$(this).foundation();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment