Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New #1

Merged
merged 3 commits into from
Mar 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bower_components
27 changes: 27 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "site",
"homepage": "https://github.com/jankosacc/site",
"authors": [
"jankos <[email protected]>"
],
"description": "",
"main": "index.html",
"moduleType": [],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap": "^3.3.6",
"requirejs": "^2.1.22",
"backbone": "^1.2.3",
"mustache.js": "mustache#^2.2.1",
"normalize-css": "normalize.css#^3.0.3",
"text": "requirejs-text#^2.0.14"
}
}
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<head>
<meta charset="utf-8">
<title>site</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script data-main="js/main.js" src="bower_components/requirejs/require.js"></script>
</head>
<body>
<header class="header">
Expand All @@ -23,6 +25,5 @@ <h2>Main</h2>
<footer class="footer">
&copy; 2016 Jan Kos
</footer>
<script src="script.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
define(['jquery', 'underscore', 'backbone', 'router'],
function ($, _, Backbone, SiteRouter) {
var initialize = function(){
SiteRouter.initialize();
};
return {
initialize: initialize
};
});
28 changes: 28 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require.config({
paths: {
'jquery': '/bower_components/jquery/dist/jquery',
'underscore': '/bower_components/underscore/underscore',
'backbone': '/bower_components/backbone/backbone',
'mustache': '/bower_components/mustache.js/mustache',
'text': '/bower_components/requirejs-text/text'
},
shim: {
'jquery': {
exports: '$'
},
'underscore': {
exports: '_'
},
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'mustache': {
exports: 'Mustache'
}
}
});

require(['app'], function (App) {
App.initialize();
});