]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Prepare folders structure for angular app
authorChocobozzz <florian.bigard@gmail.com>
Mon, 7 Mar 2016 10:33:59 +0000 (11:33 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Mon, 7 Mar 2016 10:33:59 +0000 (11:33 +0100)
60 files changed:
Gruntfile.js
client/app/images/favicon.png [moved from public/images/favicon.png with 100% similarity]
client/app/images/loading.gif [moved from public/images/loading.gif with 100% similarity]
client/app/javascripts/index.js [moved from public/javascripts/index.js with 100% similarity]
client/app/stylesheets/application.scss [moved from public/stylesheets/application.scss with 100% similarity]
client/app/stylesheets/base.scss [moved from public/stylesheets/base.scss with 100% similarity]
client/app/stylesheets/bootstrap-variables.scss [moved from public/stylesheets/bootstrap-variables.scss with 100% similarity]
client/app/stylesheets/index.scss [moved from public/stylesheets/index.scss with 100% similarity]
server.js
server/controllers/api/v1/index.js [moved from controllers/api/v1/index.js with 100% similarity]
server/controllers/api/v1/pods.js [moved from controllers/api/v1/pods.js with 100% similarity]
server/controllers/api/v1/remoteVideos.js [moved from controllers/api/v1/remoteVideos.js with 100% similarity]
server/controllers/api/v1/videos.js [moved from controllers/api/v1/videos.js with 100% similarity]
server/controllers/index.js [moved from controllers/index.js with 100% similarity]
server/controllers/views.js [moved from controllers/views.js with 100% similarity]
server/helpers/customValidators.js [moved from helpers/customValidators.js with 100% similarity]
server/helpers/logger.js [moved from helpers/logger.js with 100% similarity]
server/helpers/peertubeCrypto.js [moved from helpers/peertubeCrypto.js with 100% similarity]
server/helpers/requests.js [moved from helpers/requests.js with 100% similarity]
server/helpers/utils.js [moved from helpers/utils.js with 100% similarity]
server/initializers/checker.js [moved from initializers/checker.js with 100% similarity]
server/initializers/constants.js [moved from initializers/constants.js with 100% similarity]
server/initializers/database.js [moved from initializers/database.js with 100% similarity]
server/lib/friends.js [moved from lib/friends.js with 100% similarity]
server/lib/poolRequests.js [moved from lib/poolRequests.js with 100% similarity]
server/lib/videos.js [moved from lib/videos.js with 100% similarity]
server/lib/webtorrent.js [moved from lib/webtorrent.js with 100% similarity]
server/lib/webtorrentProcess.js [moved from lib/webtorrentProcess.js with 100% similarity]
server/middlewares/cache.js [moved from middlewares/cache.js with 100% similarity]
server/middlewares/index.js [moved from middlewares/index.js with 100% similarity]
server/middlewares/reqValidators/index.js [moved from middlewares/reqValidators/index.js with 100% similarity]
server/middlewares/reqValidators/pods.js [moved from middlewares/reqValidators/pods.js with 100% similarity]
server/middlewares/reqValidators/remote.js [moved from middlewares/reqValidators/remote.js with 100% similarity]
server/middlewares/reqValidators/utils.js [moved from middlewares/reqValidators/utils.js with 100% similarity]
server/middlewares/reqValidators/videos.js [moved from middlewares/reqValidators/videos.js with 100% similarity]
server/middlewares/secure.js [moved from middlewares/secure.js with 100% similarity]
server/models/pods.js [moved from models/pods.js with 100% similarity]
server/models/poolRequests.js [moved from models/poolRequests.js with 100% similarity]
server/models/videos.js [moved from models/videos.js with 100% similarity]
server/tests/api/checkParams.js [moved from tests/api/checkParams.js with 100% similarity]
server/tests/api/fixtures/video_short.mp4 [moved from tests/api/fixtures/video_short.mp4 with 100% similarity]
server/tests/api/fixtures/video_short.ogv [moved from tests/api/fixtures/video_short.ogv with 100% similarity]
server/tests/api/fixtures/video_short.webm [moved from tests/api/fixtures/video_short.webm with 100% similarity]
server/tests/api/fixtures/video_short1.webm [moved from tests/api/fixtures/video_short1.webm with 100% similarity]
server/tests/api/fixtures/video_short2.webm [moved from tests/api/fixtures/video_short2.webm with 100% similarity]
server/tests/api/fixtures/video_short3.webm [moved from tests/api/fixtures/video_short3.webm with 100% similarity]
server/tests/api/fixtures/video_short_fake.webm [moved from tests/api/fixtures/video_short_fake.webm with 100% similarity]
server/tests/api/friendsAdvanced.js [moved from tests/api/friendsAdvanced.js with 100% similarity]
server/tests/api/friendsBasic.js [moved from tests/api/friendsBasic.js with 100% similarity]
server/tests/api/index.js [moved from tests/api/index.js with 100% similarity]
server/tests/api/multiplePods.js [moved from tests/api/multiplePods.js with 100% similarity]
server/tests/api/singlePod.js [moved from tests/api/singlePod.js with 100% similarity]
server/tests/api/utils.js [moved from tests/api/utils.js with 100% similarity]
server/tests/index.js [moved from tests/index.js with 100% similarity]
views/error.jade [deleted file]
views/footer.jade [deleted file]
views/header.jade [deleted file]
views/index.jade [deleted file]
views/layout.jade [deleted file]
views/panel.jade [deleted file]

index 6df0c023aa942e9a608eb4de2049e2c475ecc251..5aaa13dfff4c22f6c6de480621085244180003f6 100644 (file)
@@ -2,13 +2,11 @@
 
 module.exports = function (grunt) {
   var paths = {
-    dist: 'dist',
-    jade: 'views/**/**/*.jade',
     css: 'public/stylesheets/*.css',
     scss: 'public/stylesheets/application.scss',
     vendor: 'public/stylesheets/vendor',
     js: 'public/javascripts/*.js',
-    routes: 'controllers/**/*.js',
+    routes: './server/controllers/**/*.js',
     main: './server.js',
     browserified: 'public/javascripts/bundle.js',
     img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
index c971982b37a253297c4a9589128a2f2a60fd718e..5f474a1962128b9de731b0f8dafb527e8c527613 100644 (file)
--- a/server.js
+++ b/server.js
@@ -14,7 +14,7 @@ var WebSocketServer = require('ws').Server
 var app = express()
 
 // ----------- Checker -----------
-var checker = require('./initializers/checker')
+var checker = require('./server/initializers/checker')
 
 var miss = checker.checkConfig()
 if (miss.length !== 0) {
@@ -25,16 +25,16 @@ checker.createDirectoriesIfNotExist()
 
 // ----------- PeerTube modules -----------
 var config = require('config')
-var constants = require('./initializers/constants')
-var customValidators = require('./helpers/customValidators')
-var database = require('./initializers/database')
-var logger = require('./helpers/logger')
-var peertubeCrypto = require('./helpers/peertubeCrypto')
-var poolRequests = require('./lib/poolRequests')
-var routes = require('./controllers')
-var utils = require('./helpers/utils')
-var videos = require('./lib/videos')
-var webtorrent = require('./lib/webtorrent')
+var constants = require('./server/initializers/constants')
+var customValidators = require('./server/helpers/customValidators')
+var database = require('./server/initializers/database')
+var logger = require('./server/helpers/logger')
+var peertubeCrypto = require('./server/helpers/peertubeCrypto')
+var poolRequests = require('./server/lib/poolRequests')
+var routes = require('./server/controllers')
+var utils = require('./server/helpers/utils')
+var videos = require('./server/lib/videos')
+var webtorrent = require('./server/lib/webtorrent')
 
 // Get configurations
 var port = config.get('listen.port')
@@ -67,11 +67,7 @@ app.use(require('connect-livereload')({
 require('segfault-handler').registerHandler()
 
 // Static files
-app.use(express.static(path.join(__dirname, '/public'), { maxAge: 0 }))
-
-// Jade template from ./views directory
-app.set('views', path.join(__dirname, '/views'))
-app.set('view engine', 'jade')
+app.use(express.static(path.join(__dirname, '/app'), { maxAge: 0 }))
 
 // API routes
 var api_route = '/api/' + constants.API_VERSION
similarity index 100%
rename from helpers/logger.js
rename to server/helpers/logger.js
similarity index 100%
rename from helpers/utils.js
rename to server/helpers/utils.js
similarity index 100%
rename from lib/friends.js
rename to server/lib/friends.js
similarity index 100%
rename from lib/videos.js
rename to server/lib/videos.js
similarity index 100%
rename from lib/webtorrent.js
rename to server/lib/webtorrent.js
similarity index 100%
rename from models/pods.js
rename to server/models/pods.js
similarity index 100%
rename from models/videos.js
rename to server/models/videos.js
similarity index 100%
rename from tests/api/index.js
rename to server/tests/api/index.js
similarity index 100%
rename from tests/api/utils.js
rename to server/tests/api/utils.js
similarity index 100%
rename from tests/index.js
rename to server/tests/index.js
diff --git a/views/error.jade b/views/error.jade
deleted file mode 100644 (file)
index d9e8a78..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-extends layout
-
-block content
-  h1= message
-  if error
-    h2= error.status
-    pre #{error.stack}
-    
diff --git a/views/footer.jade b/views/footer.jade
deleted file mode 100644 (file)
index c7754f5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-footer
-
-  | PeerTube, CopyLeft 2015
diff --git a/views/header.jade b/views/header.jade
deleted file mode 100644 (file)
index 6b84333..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.navbar.navbar-default
-  .container-fluid
-    .navbar-header
-      a.navbar-brand(href='/') PeerTube
-    .navbar-header
-      form.navbar-form(role='search')
-        .form-group.search-group
-          input.form-control#search-video(type='text' name='search_video' placeholder='Search a video...')
-          a.search-btn.btn.btn-link.glyphicon.glyphicon-search(type='submit')
\ No newline at end of file
diff --git a/views/index.jade b/views/index.jade
deleted file mode 100644 (file)
index a49758f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-extends layout
-
-block content
-  div(class='container')
-    div(class='row')
-      include panel
-
-      div(id='ajax_load' class='col-md-9')
-
-
-    include footer
-
-  // build:js /javascripts/global.min.js
-  script(src='/javascripts/bundle.js')
-  // endbuild
diff --git a/views/layout.jade b/views/layout.jade
deleted file mode 100644 (file)
index 43c28cd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-doctype html
-html
-  head
-    link(rel='icon' type='image/png' href='/images/favicon.png')
-    meta(name='viewport' content='width=device-width, initial-scale=1')
-    title= title
-
-    // build:css /stylesheets/global.min.css
-    each file in [ 'global' ]
-      link(rel='stylesheet', href='/stylesheets/' + file + '.css')
-    // endbuild
-
-  body
-    include header
-    block content
diff --git a/views/panel.jade b/views/panel.jade
deleted file mode 100644 (file)
index 0d124fb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-menu(class='col-md-2')
-
-  div(id='panel_get_videos' class='panel_button')
-    span(class='glyphicon glyphicon-list')
-    | Get videos
-
-  div(id='panel_upload_video' class='panel_button')
-    span(class='glyphicon glyphicon-cloud-upload')
-    | Upload a video
-
-  div(id='panel_make_friends' class='panel_button')
-    span(class='glyphicon glyphicon-user')
-    | Make friends
-
-  div(id='panel_quit_friends' class='panel_button')
-    span(class='glyphicon glyphicon-plane')
-    | Quit friends