Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from tbranyen/router
reworked router out into separate file
- Loading branch information
Showing
5 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
// Set the require.js configuration for your application. | ||
require.config({ | ||
// Initialize the application with the main application file | ||
|
||
// Initialize the application with the main application file. | ||
deps: ["main"], | ||
|
||
paths: { | ||
// JavaScript folders | ||
// JavaScript folders. | ||
libs: "../assets/js/libs", | ||
plugins: "../assets/js/plugins", | ||
|
||
// Libraries | ||
// Libraries. | ||
jquery: "../assets/js/libs/jquery", | ||
lodash: "../assets/js/libs/lodash", | ||
backbone: "../assets/js/libs/backbone" | ||
}, | ||
|
||
shim: { | ||
// Backbone library depends on lodash and jQuery. | ||
backbone: { | ||
deps: ["lodash", "jquery"], | ||
exports: "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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
define([ | ||
// Application. | ||
"app" | ||
], | ||
|
||
function(app) { | ||
|
||
// Defining the application router, you can attach sub routers here. | ||
var Router = Backbone.Router.extend({ | ||
routes: { | ||
"": "index" | ||
}, | ||
|
||
index: function() { | ||
|
||
} | ||
}); | ||
|
||
return Router; | ||
|
||
}); |
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