main.js
一番最初に読み込まれるファイルで、各種、jquery等のロードを行う
#main.js
/*global require*/ 'use strict'; require.config({ // Base URL to our scripts baseUrl: '/scripts', // Sets the configuration for your third party scripts that are not AMD compatible shim: { jquery: { exports: '$' }, jqueryactual: { 'deps': ['jquery'] }, underscore: { exports: '_' }, backbone: { deps: [ 'underscore', 'jquery' ], exports: 'Backbone' }, bootstrap: { 'deps': ['jquery'] }, bootswatch: { 'deps': ['jquery', 'bootstrap'] }, dropdowncheckbox: { 'deps': ['jquery'] }, jqueryconfirm: { 'deps': ['jquery'] }, google: { 'deps': ['jquery'] } }, // 3rd party script alias names (Easier to type "jquery" than "libs/jquery-1.7.2.min") paths: { jquery: '../bower_components/jquery/jquery', jqueryactual: 'vendor/jquery.actual', jqueryconfirm: '../bower_components/jquery-confirm/jquery.confirm', backbone: '../bower_components/backbone/backbone', underscore: '../bower_components/underscore/underscore', bootstrap: '../bower_components/bootstrap/dist/js/bootstrap.min', bootswatch: '../bower_components/bootswatch/assets/js/bootswatch', dropdowncheckbox: 'vendor/bootstrap-dropdown-checkbox', google: 'https://www.google.com/jsapi?autoload={"modules":[{"name":"visualization","version":"1","packages":["corechart","table"]}]}' } }); require([ 'jquery', 'app', 'bootstrap', 'bootswatch', 'jqueryactual', 'dropdowncheckbox' , 'jqueryconfirm' ], function ($, app) { app.init(); });