From bb503c1d03769b8e12683538b0e989e005cdf216 Mon Sep 17 00:00:00 2001 From: devfake Date: Tue, 23 Jun 2015 10:36:29 +0200 Subject: [PATCH] redefine app structure --- site/client/app/app.js | 4 ++-- site/client/app/components/deckBuilder.js | 5 ----- .../app/modules/deck-builder/components/deck-builder.js | 5 +++++ .../deck-builder/views/deck-builder.html} | 0 site/client/app/{ => modules/inner}/components/chat.js | 0 site/client/app/{ => modules/inner}/components/inner.js | 6 +++--- .../client/app/{ => modules/inner}/components/navigation.js | 2 -- .../inner/components/search-match.js} | 2 +- site/client/app/{ => modules/inner}/views/chat.html | 0 site/client/app/{ => modules/inner}/views/inner.html | 0 site/client/app/{ => modules/inner}/views/navigation.html | 0 .../inner/views/search-match.html} | 0 site/client/app/{ => modules/landing}/components/landing.js | 6 ++---- .../modals => modules/landing/components}/login.js | 2 +- site/client/app/{ => modules/landing}/views/landing.html | 0 .../app/{views/modals => modules/landing/views}/login.html | 0 site/client/app/{ => modules/lobby}/components/lobby.js | 0 site/client/app/{ => modules/lobby}/views/lobby.html | 0 18 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 site/client/app/components/deckBuilder.js create mode 100644 site/client/app/modules/deck-builder/components/deck-builder.js rename site/client/app/{views/deckBuilder.html => modules/deck-builder/views/deck-builder.html} (100%) rename site/client/app/{ => modules/inner}/components/chat.js (100%) rename site/client/app/{ => modules/inner}/components/inner.js (58%) rename site/client/app/{ => modules/inner}/components/navigation.js (92%) rename site/client/app/{components/modals/searchMatch.js => modules/inner/components/search-match.js} (71%) rename site/client/app/{ => modules/inner}/views/chat.html (100%) rename site/client/app/{ => modules/inner}/views/inner.html (100%) rename site/client/app/{ => modules/inner}/views/navigation.html (100%) rename site/client/app/{views/modals/searchMatch.html => modules/inner/views/search-match.html} (100%) rename site/client/app/{ => modules/landing}/components/landing.js (85%) rename site/client/app/{components/modals => modules/landing/components}/login.js (52%) rename site/client/app/{ => modules/landing}/views/landing.html (100%) rename site/client/app/{views/modals => modules/landing/views}/login.html (100%) rename site/client/app/{ => modules/lobby}/components/lobby.js (100%) rename site/client/app/{ => modules/lobby}/views/lobby.html (100%) diff --git a/site/client/app/app.js b/site/client/app/app.js index fba70ea..82a6431 100644 --- a/site/client/app/app.js +++ b/site/client/app/app.js @@ -7,8 +7,8 @@ Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content'); var app = Vue.extend({ components: { - inner: require('./components/inner'), - landing: require('./components/landing') + inner: require('./modules/inner/components/inner'), + landing: require('./modules/landing/components/landing') } }); diff --git a/site/client/app/components/deckBuilder.js b/site/client/app/components/deckBuilder.js deleted file mode 100644 index b3113c5..0000000 --- a/site/client/app/components/deckBuilder.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - - template: require('../views/deckBuilder.html') - -}; \ No newline at end of file diff --git a/site/client/app/modules/deck-builder/components/deck-builder.js b/site/client/app/modules/deck-builder/components/deck-builder.js new file mode 100644 index 0000000..45f4581 --- /dev/null +++ b/site/client/app/modules/deck-builder/components/deck-builder.js @@ -0,0 +1,5 @@ +module.exports = { + + template: require('../views/deck-builder.html') + +}; \ No newline at end of file diff --git a/site/client/app/views/deckBuilder.html b/site/client/app/modules/deck-builder/views/deck-builder.html similarity index 100% rename from site/client/app/views/deckBuilder.html rename to site/client/app/modules/deck-builder/views/deck-builder.html diff --git a/site/client/app/components/chat.js b/site/client/app/modules/inner/components/chat.js similarity index 100% rename from site/client/app/components/chat.js rename to site/client/app/modules/inner/components/chat.js diff --git a/site/client/app/components/inner.js b/site/client/app/modules/inner/components/inner.js similarity index 58% rename from site/client/app/components/inner.js rename to site/client/app/modules/inner/components/inner.js index c7a68d4..bdcd917 100644 --- a/site/client/app/components/inner.js +++ b/site/client/app/modules/inner/components/inner.js @@ -11,12 +11,12 @@ module.exports = { }, components: { - searchmatch: require('./modals/searchMatch'), + searchmatch: require('./search-match'), navigation: require('./navigation'), chat: require('./chat'), - lobby: require('./lobby'), - deckBuilder: require('./deckBuilder') + lobby: require('./../../lobby/components/lobby'), + deckBuilder: require('./../../deck-builder/components/deck-builder'), } }; \ No newline at end of file diff --git a/site/client/app/components/navigation.js b/site/client/app/modules/inner/components/navigation.js similarity index 92% rename from site/client/app/components/navigation.js rename to site/client/app/modules/inner/components/navigation.js index d3c444f..d39de77 100644 --- a/site/client/app/components/navigation.js +++ b/site/client/app/modules/inner/components/navigation.js @@ -1,5 +1,3 @@ -var router = require('./../routes'); - module.exports = { template: require('../views/navigation.html'), diff --git a/site/client/app/components/modals/searchMatch.js b/site/client/app/modules/inner/components/search-match.js similarity index 71% rename from site/client/app/components/modals/searchMatch.js rename to site/client/app/modules/inner/components/search-match.js index 1b05253..216f50d 100644 --- a/site/client/app/components/modals/searchMatch.js +++ b/site/client/app/modules/inner/components/search-match.js @@ -1,6 +1,6 @@ module.exports = { - template: require('../../views/modals/searchMatch.html'), + template: require('./../views/search-match.html'), inherit: true, diff --git a/site/client/app/views/chat.html b/site/client/app/modules/inner/views/chat.html similarity index 100% rename from site/client/app/views/chat.html rename to site/client/app/modules/inner/views/chat.html diff --git a/site/client/app/views/inner.html b/site/client/app/modules/inner/views/inner.html similarity index 100% rename from site/client/app/views/inner.html rename to site/client/app/modules/inner/views/inner.html diff --git a/site/client/app/views/navigation.html b/site/client/app/modules/inner/views/navigation.html similarity index 100% rename from site/client/app/views/navigation.html rename to site/client/app/modules/inner/views/navigation.html diff --git a/site/client/app/views/modals/searchMatch.html b/site/client/app/modules/inner/views/search-match.html similarity index 100% rename from site/client/app/views/modals/searchMatch.html rename to site/client/app/modules/inner/views/search-match.html diff --git a/site/client/app/components/landing.js b/site/client/app/modules/landing/components/landing.js similarity index 85% rename from site/client/app/components/landing.js rename to site/client/app/modules/landing/components/landing.js index 616f5e3..05e1f86 100644 --- a/site/client/app/components/landing.js +++ b/site/client/app/modules/landing/components/landing.js @@ -1,8 +1,6 @@ -var router = require('./../routes'); - module.exports = { - template: require('../views/landing.html'), + template: require('./../views/landing.html'), inherit: true, @@ -13,7 +11,7 @@ module.exports = { }, components: { - login: require('./modals/login') + login: require('./login') }, ready: function() { diff --git a/site/client/app/components/modals/login.js b/site/client/app/modules/landing/components/login.js similarity index 52% rename from site/client/app/components/modals/login.js rename to site/client/app/modules/landing/components/login.js index 05c69d2..8fd91a6 100644 --- a/site/client/app/components/modals/login.js +++ b/site/client/app/modules/landing/components/login.js @@ -1,6 +1,6 @@ module.exports = { - template: require('../../views/modals/login.html'), + template: require('./../views/login.html'), inherit: true, diff --git a/site/client/app/views/landing.html b/site/client/app/modules/landing/views/landing.html similarity index 100% rename from site/client/app/views/landing.html rename to site/client/app/modules/landing/views/landing.html diff --git a/site/client/app/views/modals/login.html b/site/client/app/modules/landing/views/login.html similarity index 100% rename from site/client/app/views/modals/login.html rename to site/client/app/modules/landing/views/login.html diff --git a/site/client/app/components/lobby.js b/site/client/app/modules/lobby/components/lobby.js similarity index 100% rename from site/client/app/components/lobby.js rename to site/client/app/modules/lobby/components/lobby.js diff --git a/site/client/app/views/lobby.html b/site/client/app/modules/lobby/views/lobby.html similarity index 100% rename from site/client/app/views/lobby.html rename to site/client/app/modules/lobby/views/lobby.html