From aab247a76822189c1eb232c1618ba39d6130c70d Mon Sep 17 00:00:00 2001 From: jankos Date: Tue, 1 Mar 2016 09:22:07 +0200 Subject: [PATCH 1/3] Saving status --- .gitignore | 1 + bower.json | 22 ++++++++++++++++++++++ index.html | 1 + 3 files changed, 24 insertions(+) create mode 100644 .gitignore create mode 100644 bower.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b37e43d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bower_components diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..b9bea24 --- /dev/null +++ b/bower.json @@ -0,0 +1,22 @@ +{ + "name": "site", + "homepage": "https://github.com/jankosacc/site", + "authors": [ + "jankos " + ], + "description": "", + "main": "index.html", + "moduleType": [], + "license": "MIT", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "bootstrap": "^3.3.6" + } +} diff --git a/index.html b/index.html index e7fdcb3..6cf46a5 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ site + From 69b81d9cf03b3797384ef0a50259e797c727ed25 Mon Sep 17 00:00:00 2001 From: jankos Date: Tue, 1 Mar 2016 09:58:08 +0200 Subject: [PATCH 2/3] Adding requirejs --- bower.json | 7 ++++++- index.html | 2 +- js/main.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 js/main.js diff --git a/bower.json b/bower.json index b9bea24..b0913d6 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,11 @@ "tests" ], "dependencies": { - "bootstrap": "^3.3.6" + "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" } } diff --git a/index.html b/index.html index 6cf46a5..c94c9d7 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ site +
@@ -24,6 +25,5 @@

Main

© 2016 Jan Kos
- diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..a29eb5a --- /dev/null +++ b/js/main.js @@ -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(); +}); From eb8e4c92d9b137a10e50c6a8daed1a7b9e223023 Mon Sep 17 00:00:00 2001 From: jankos Date: Tue, 1 Mar 2016 10:24:26 +0200 Subject: [PATCH 3/3] Adding app.js --- js/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/app.js diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..db3501b --- /dev/null +++ b/js/app.js @@ -0,0 +1,9 @@ +define(['jquery', 'underscore', 'backbone', 'router'], +function ($, _, Backbone, SiteRouter) { + var initialize = function(){ + SiteRouter.initialize(); + }; + return { + initialize: initialize + }; +});