Last active
August 29, 2015 14:08
-
-
Save rgstephens/e72cb37e64590333944c to your computer and use it in GitHub Desktop.
Add foundation to main.js from Yeoman generator-backbone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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