aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-27 16:23:10 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-27 16:23:10 +0200
commit41a2aee38cf812510010da09de9bae53590ec119 (patch)
tree79d55d6ae0ef6f66ccb88890cf1ef1946dc65fb4
parent157cb9c9713e08ff70078660a32dd77ecb87eabc (diff)
downloadPeerTube-41a2aee38cf812510010da09de9bae53590ec119.tar.gz
PeerTube-41a2aee38cf812510010da09de9bae53590ec119.tar.zst
PeerTube-41a2aee38cf812510010da09de9bae53590ec119.zip
Follow the angular styleguide for the directories structure
-rw-r--r--client/.gitignore8
-rw-r--r--client/app/app.component.html (renamed from client/angular/app/app.component.html)0
-rw-r--r--client/app/app.component.scss (renamed from client/angular/app/app.component.scss)0
-rw-r--r--client/app/app.component.ts (renamed from client/angular/app/app.component.ts)45
-rw-r--r--client/app/friends/friend.service.ts (renamed from client/angular/friends/services/friends.service.ts)2
-rw-r--r--client/app/friends/index.ts1
-rw-r--r--client/app/shared/index.ts3
-rw-r--r--client/app/shared/search-field.type.ts (renamed from client/angular/app/search.ts)5
-rw-r--r--client/app/shared/search.component.html (renamed from client/angular/app/search.component.html)0
-rw-r--r--client/app/shared/search.component.ts (renamed from client/angular/app/search.component.ts)5
-rw-r--r--client/app/shared/search.model.ts6
-rw-r--r--client/app/users/index.ts2
-rw-r--r--client/app/users/login/index.ts1
-rw-r--r--client/app/users/login/login.component.html (renamed from client/angular/users/components/login/login.component.html)0
-rw-r--r--client/app/users/login/login.component.scss (renamed from client/angular/users/components/login/login.component.scss)0
-rw-r--r--client/app/users/login/login.component.ts (renamed from client/angular/users/components/login/login.component.ts)8
-rw-r--r--client/app/users/shared/auth-status.model.ts (renamed from client/angular/users/models/authStatus.ts)0
-rw-r--r--client/app/users/shared/auth.service.ts (renamed from client/angular/users/services/auth.service.ts)6
-rw-r--r--client/app/users/shared/index.ts4
-rw-r--r--client/app/users/shared/token.model.ts (renamed from client/angular/users/models/token.ts)0
-rw-r--r--client/app/users/shared/user.model.ts (renamed from client/angular/users/models/user.ts)2
-rw-r--r--client/app/videos/index.ts4
-rw-r--r--client/app/videos/shared/index.ts5
-rw-r--r--client/app/videos/shared/loader/index.ts1
-rw-r--r--client/app/videos/shared/loader/loader.component.html (renamed from client/angular/videos/loader.component.html)0
-rw-r--r--client/app/videos/shared/loader/loader.component.scss (renamed from client/angular/videos/loader.component.scss)0
-rw-r--r--client/app/videos/shared/loader/loader.component.ts (renamed from client/angular/videos/loader.component.ts)4
-rw-r--r--client/app/videos/shared/pagination.model.ts (renamed from client/angular/videos/pagination.ts)0
-rw-r--r--client/app/videos/shared/sort-field.type.ts (renamed from client/angular/videos/components/list/sort.ts)0
-rw-r--r--client/app/videos/shared/video.model.ts (renamed from client/angular/videos/video.ts)0
-rw-r--r--client/app/videos/shared/video.service.ts (renamed from client/angular/videos/videos.service.ts)12
-rw-r--r--client/app/videos/video-add/index.ts1
-rw-r--r--client/app/videos/video-add/video-add.component.html (renamed from client/angular/videos/components/add/videos-add.component.html)0
-rw-r--r--client/app/videos/video-add/video-add.component.scss (renamed from client/angular/videos/components/add/videos-add.component.scss)0
-rw-r--r--client/app/videos/video-add/video-add.component.ts (renamed from client/angular/videos/components/add/videos-add.component.ts)11
-rw-r--r--client/app/videos/video-list/index.ts3
-rw-r--r--client/app/videos/video-list/video-list.component.html (renamed from client/angular/videos/components/list/videos-list.component.html)0
-rw-r--r--client/app/videos/video-list/video-list.component.scss (renamed from client/angular/videos/components/list/videos-list.component.scss)0
-rw-r--r--client/app/videos/video-list/video-list.component.ts (renamed from client/angular/videos/components/list/videos-list.component.ts)31
-rw-r--r--client/app/videos/video-list/video-miniature.component.html (renamed from client/angular/videos/components/list/video-miniature.component.html)0
-rw-r--r--client/app/videos/video-list/video-miniature.component.scss (renamed from client/angular/videos/components/list/video-miniature.component.scss)0
-rw-r--r--client/app/videos/video-list/video-miniature.component.ts (renamed from client/angular/videos/components/list/video-miniature.component.ts)15
-rw-r--r--client/app/videos/video-list/video-sort.component.html (renamed from client/angular/videos/components/list/video-sort.component.html)0
-rw-r--r--client/app/videos/video-list/video-sort.component.ts (renamed from client/angular/videos/components/list/video-sort.component.ts)6
-rw-r--r--client/app/videos/video-watch/index.ts1
-rw-r--r--client/app/videos/video-watch/video-watch.component.html (renamed from client/angular/videos/components/watch/videos-watch.component.html)0
-rw-r--r--client/app/videos/video-watch/video-watch.component.scss (renamed from client/angular/videos/components/watch/videos-watch.component.scss)0
-rw-r--r--client/app/videos/video-watch/video-watch.component.ts (renamed from client/angular/videos/components/watch/videos-watch.component.ts)19
-rw-r--r--client/index.html24
-rw-r--r--client/main.ts (renamed from client/angular/main.ts)1
-rw-r--r--client/stylesheets/application.scss2
-rw-r--r--client/systemjs.config.js9
-rw-r--r--client/tsconfig.json52
-rwxr-xr-xscripts/build/client/sass.sh2
-rwxr-xr-xscripts/clean/client/sass.sh2
-rwxr-xr-xscripts/clean/client/tsc.sh3
-rwxr-xr-xscripts/watch/client/livereload.sh2
-rwxr-xr-xscripts/watch/client/sass.sh2
-rw-r--r--server.js4
59 files changed, 177 insertions, 137 deletions
diff --git a/client/.gitignore b/client/.gitignore
index 0ab218d71..81e4a1cf7 100644
--- a/client/.gitignore
+++ b/client/.gitignore
@@ -1,6 +1,8 @@
1typings 1typings
2angular/**/*.js 2app/**/*.js
3angular/**/*.map 3app/**/*.map
4angular/**/*.css 4app/**/*.css
5stylesheets/index.css 5stylesheets/index.css
6bundles 6bundles
7main.js
8main.js.map
diff --git a/client/angular/app/app.component.html b/client/app/app.component.html
index 48e97d523..48e97d523 100644
--- a/client/angular/app/app.component.html
+++ b/client/app/app.component.html
diff --git a/client/angular/app/app.component.scss b/client/app/app.component.scss
index e02c2d5b0..e02c2d5b0 100644
--- a/client/angular/app/app.component.scss
+++ b/client/app/app.component.scss
diff --git a/client/angular/app/app.component.ts b/client/app/app.component.ts
index 722d0dca0..c94ff79a7 100644
--- a/client/angular/app/app.component.ts
+++ b/client/app/app.component.ts
@@ -1,17 +1,20 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, Router } from '@angular/router-deprecated';
3import { HTTP_PROVIDERS } from '@angular/http'; 2import { HTTP_PROVIDERS } from '@angular/http';
3import { RouteConfig, Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated';
4 4
5import { VideosAddComponent } from '../videos/components/add/videos-add.component'; 5import { FriendService } from './friends/index';
6import { VideosListComponent } from '../videos/components/list/videos-list.component'; 6import { Search, SearchComponent } from './shared/index';
7import { VideosWatchComponent } from '../videos/components/watch/videos-watch.component'; 7import {
8import { VideosService } from '../videos/videos.service'; 8 UserLoginComponent,
9import { FriendsService } from '../friends/services/friends.service'; 9 AuthService,
10import { UserLoginComponent } from '../users/components/login/login.component'; 10 AuthStatus
11import { AuthService } from '../users/services/auth.service'; 11} from './users/index';
12import { AuthStatus } from '../users/models/authStatus'; 12import {
13import { SearchComponent } from './search.component'; 13 VideoAddComponent,
14import { Search } from './search'; 14 VideoListComponent,
15 VideoWatchComponent,
16 VideoService
17} from './videos/index';
15 18
16@RouteConfig([ 19@RouteConfig([
17 { 20 {
@@ -22,35 +25,35 @@ import { Search } from './search';
22 { 25 {
23 path: '/videos/list', 26 path: '/videos/list',
24 name: 'VideosList', 27 name: 'VideosList',
25 component: VideosListComponent, 28 component: VideoListComponent,
26 useAsDefault: true 29 useAsDefault: true
27 }, 30 },
28 { 31 {
29 path: '/videos/watch/:id', 32 path: '/videos/watch/:id',
30 name: 'VideosWatch', 33 name: 'VideosWatch',
31 component: VideosWatchComponent 34 component: VideoWatchComponent
32 }, 35 },
33 { 36 {
34 path: '/videos/add', 37 path: '/videos/add',
35 name: 'VideosAdd', 38 name: 'VideosAdd',
36 component: VideosAddComponent 39 component: VideoAddComponent
37 } 40 }
38]) 41])
39 42
40@Component({ 43@Component({
41 selector: 'my-app', 44 selector: 'my-app',
42 templateUrl: 'app/angular/app/app.component.html', 45 templateUrl: 'client/app/app.component.html',
43 styleUrls: [ 'app/angular/app/app.component.css' ], 46 styleUrls: [ 'client/app/app.component.css' ],
44 directives: [ ROUTER_DIRECTIVES, SearchComponent ], 47 directives: [ ROUTER_DIRECTIVES, SearchComponent ],
45 providers: [ ROUTER_PROVIDERS, HTTP_PROVIDERS, VideosService, FriendsService, AuthService ] 48 providers: [ ROUTER_PROVIDERS, HTTP_PROVIDERS, VideoService, FriendService, AuthService ]
46}) 49})
47 50
48export class AppComponent { 51export class AppComponent {
49 isLoggedIn: boolean; 52 isLoggedIn: boolean;
50 search_field: string = name; 53 search_field: string = name;
51 choices = [ ]; 54 choices = [ ];
52 55
53 constructor(private _friendsService: FriendsService, 56 constructor(private _friendService: FriendService,
54 private _authService: AuthService, 57 private _authService: AuthService,
55 private _router: Router 58 private _router: Router
56 59
@@ -83,7 +86,7 @@ export class AppComponent {
83 } 86 }
84 87
85 makeFriends() { 88 makeFriends() {
86 this._friendsService.makeFriends().subscribe( 89 this._friendService.makeFriends().subscribe(
87 status => { 90 status => {
88 if (status === 409) { 91 if (status === 409) {
89 alert('Already made friends!'); 92 alert('Already made friends!');
@@ -96,7 +99,7 @@ export class AppComponent {
96 } 99 }
97 100
98 quitFriends() { 101 quitFriends() {
99 this._friendsService.quitFriends().subscribe( 102 this._friendService.quitFriends().subscribe(
100 status => { 103 status => {
101 alert('Quit friends!'); 104 alert('Quit friends!');
102 }, 105 },
diff --git a/client/angular/friends/services/friends.service.ts b/client/app/friends/friend.service.ts
index cb34323e4..d143ec40d 100644
--- a/client/angular/friends/services/friends.service.ts
+++ b/client/app/friends/friend.service.ts
@@ -3,7 +3,7 @@ import { Http, Response } from '@angular/http';
3import { Observable } from 'rxjs/Rx'; 3import { Observable } from 'rxjs/Rx';
4 4
5@Injectable() 5@Injectable()
6export class FriendsService { 6export class FriendService {
7 private _baseFriendsUrl = '/api/v1/pods/'; 7 private _baseFriendsUrl = '/api/v1/pods/';
8 8
9 constructor (private http: Http) {} 9 constructor (private http: Http) {}
diff --git a/client/app/friends/index.ts b/client/app/friends/index.ts
new file mode 100644
index 000000000..0adc256c4
--- /dev/null
+++ b/client/app/friends/index.ts
@@ -0,0 +1 @@
export * from './friend.service';
diff --git a/client/app/shared/index.ts b/client/app/shared/index.ts
new file mode 100644
index 000000000..a49a4f1a9
--- /dev/null
+++ b/client/app/shared/index.ts
@@ -0,0 +1,3 @@
1export * from './search-field.type';
2export * from './search.component';
3export * from './search.model';
diff --git a/client/angular/app/search.ts b/client/app/shared/search-field.type.ts
index c4e771b47..846236290 100644
--- a/client/angular/app/search.ts
+++ b/client/app/shared/search-field.type.ts
@@ -1,6 +1 @@
1export type SearchField = "name" | "author" | "podUrl" | "magnetUri"; export type SearchField = "name" | "author" | "podUrl" | "magnetUri";
2
3export interface Search {
4 field: SearchField;
5 value: string;
6}
diff --git a/client/angular/app/search.component.html b/client/app/shared/search.component.html
index fb13ac72e..fb13ac72e 100644
--- a/client/angular/app/search.component.html
+++ b/client/app/shared/search.component.html
diff --git a/client/angular/app/search.component.ts b/client/app/shared/search.component.ts
index e21b91fce..519810f9b 100644
--- a/client/angular/app/search.component.ts
+++ b/client/app/shared/search.component.ts
@@ -2,11 +2,12 @@ import { Component, EventEmitter, Output } from '@angular/core';
2 2
3import { DROPDOWN_DIRECTIVES} from 'ng2-bootstrap/components/dropdown'; 3import { DROPDOWN_DIRECTIVES} from 'ng2-bootstrap/components/dropdown';
4 4
5import { Search, SearchField } from './search'; 5import { Search } from './search.model';
6import { SearchField } from './search-field.type';
6 7
7@Component({ 8@Component({
8 selector: 'my-search', 9 selector: 'my-search',
9 templateUrl: 'app/angular/app/search.component.html', 10 templateUrl: 'client/app/shared/search.component.html',
10 directives: [ DROPDOWN_DIRECTIVES ] 11 directives: [ DROPDOWN_DIRECTIVES ]
11}) 12})
12 13
diff --git a/client/app/shared/search.model.ts b/client/app/shared/search.model.ts
new file mode 100644
index 000000000..932a6566c
--- /dev/null
+++ b/client/app/shared/search.model.ts
@@ -0,0 +1,6 @@
1import { SearchField } from './search-field.type';
2
3export interface Search {
4 field: SearchField;
5 value: string;
6}
diff --git a/client/app/users/index.ts b/client/app/users/index.ts
new file mode 100644
index 000000000..4f08b8bc7
--- /dev/null
+++ b/client/app/users/index.ts
@@ -0,0 +1,2 @@
1export * from './login/index';
2export * from './shared/index';
diff --git a/client/app/users/login/index.ts b/client/app/users/login/index.ts
new file mode 100644
index 000000000..69c16441f
--- /dev/null
+++ b/client/app/users/login/index.ts
@@ -0,0 +1 @@
export * from './login.component';
diff --git a/client/angular/users/components/login/login.component.html b/client/app/users/login/login.component.html
index 940694515..940694515 100644
--- a/client/angular/users/components/login/login.component.html
+++ b/client/app/users/login/login.component.html
diff --git a/client/angular/users/components/login/login.component.scss b/client/app/users/login/login.component.scss
index e69de29bb..e69de29bb 100644
--- a/client/angular/users/components/login/login.component.scss
+++ b/client/app/users/login/login.component.scss
diff --git a/client/angular/users/components/login/login.component.ts b/client/app/users/login/login.component.ts
index d339353ef..33590ad4c 100644
--- a/client/angular/users/components/login/login.component.ts
+++ b/client/app/users/login/login.component.ts
@@ -1,14 +1,12 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { Router } from '@angular/router-deprecated'; 2import { Router } from '@angular/router-deprecated';
3 3
4import { AuthService } from '../../services/auth.service'; 4import { AuthService, AuthStatus, User } from '../shared/index';
5import { AuthStatus } from '../../models/authStatus';
6import { User } from '../../models/user';
7 5
8@Component({ 6@Component({
9 selector: 'my-user-login', 7 selector: 'my-user-login',
10 styleUrls: [ 'app/angular/users/components/login/login.component.css' ], 8 styleUrls: [ 'client/app/users/login/login.component.css' ],
11 templateUrl: 'app/angular/users/components/login/login.component.html' 9 templateUrl: 'client/app/users/login/login.component.html'
12}) 10})
13 11
14export class UserLoginComponent { 12export class UserLoginComponent {
diff --git a/client/angular/users/models/authStatus.ts b/client/app/users/shared/auth-status.model.ts
index f646bd4cf..f646bd4cf 100644
--- a/client/angular/users/models/authStatus.ts
+++ b/client/app/users/shared/auth-status.model.ts
diff --git a/client/angular/users/services/auth.service.ts b/client/app/users/shared/auth.service.ts
index 099563d43..1cb042db5 100644
--- a/client/angular/users/services/auth.service.ts
+++ b/client/app/users/shared/auth.service.ts
@@ -1,9 +1,9 @@
1import { Injectable } from '@angular/core'; 1import { Injectable } from '@angular/core';
2import { Http, Response, Headers, URLSearchParams, RequestOptions } from '@angular/http'; 2import { Headers, Http, RequestOptions, Response, URLSearchParams } from '@angular/http';
3import { Observable, Subject } from 'rxjs/Rx'; 3import { Observable, Subject } from 'rxjs/Rx';
4 4
5import { AuthStatus } from '../models/authStatus'; 5import { AuthStatus } from './auth-status.model';
6import { User } from '../models/user'; 6import { User } from './user.model';
7 7
8@Injectable() 8@Injectable()
9export class AuthService { 9export class AuthService {
diff --git a/client/app/users/shared/index.ts b/client/app/users/shared/index.ts
new file mode 100644
index 000000000..c6816b3c6
--- /dev/null
+++ b/client/app/users/shared/index.ts
@@ -0,0 +1,4 @@
1export * from './auth-status.model';
2export * from './auth.service';
3export * from './token.model';
4export * from './user.model';
diff --git a/client/angular/users/models/token.ts b/client/app/users/shared/token.model.ts
index b7872e74a..b7872e74a 100644
--- a/client/angular/users/models/token.ts
+++ b/client/app/users/shared/token.model.ts
diff --git a/client/angular/users/models/user.ts b/client/app/users/shared/user.model.ts
index 3367e3bb5..73fd4ddc0 100644
--- a/client/angular/users/models/user.ts
+++ b/client/app/users/shared/user.model.ts
@@ -1,4 +1,4 @@
1import { Token } from './token'; 1import { Token } from './token.model';
2 2
3export class User { 3export class User {
4 username: string; 4 username: string;
diff --git a/client/app/videos/index.ts b/client/app/videos/index.ts
new file mode 100644
index 000000000..1c80ac5e5
--- /dev/null
+++ b/client/app/videos/index.ts
@@ -0,0 +1,4 @@
1export * from './shared/index';
2export * from './video-add/index';
3export * from './video-list/index';
4export * from './video-watch/index';
diff --git a/client/app/videos/shared/index.ts b/client/app/videos/shared/index.ts
new file mode 100644
index 000000000..c535c46fc
--- /dev/null
+++ b/client/app/videos/shared/index.ts
@@ -0,0 +1,5 @@
1export * from './loader/index';
2export * from './pagination.model';
3export * from './sort-field.type';
4export * from './video.model';
5export * from './video.service';
diff --git a/client/app/videos/shared/loader/index.ts b/client/app/videos/shared/loader/index.ts
new file mode 100644
index 000000000..ab22584e4
--- /dev/null
+++ b/client/app/videos/shared/loader/index.ts
@@ -0,0 +1 @@
export * from './loader.component';
diff --git a/client/angular/videos/loader.component.html b/client/app/videos/shared/loader/loader.component.html
index d02296a2d..d02296a2d 100644
--- a/client/angular/videos/loader.component.html
+++ b/client/app/videos/shared/loader/loader.component.html
diff --git a/client/angular/videos/loader.component.scss b/client/app/videos/shared/loader/loader.component.scss
index 454195811..454195811 100644
--- a/client/angular/videos/loader.component.scss
+++ b/client/app/videos/shared/loader/loader.component.scss
diff --git a/client/angular/videos/loader.component.ts b/client/app/videos/shared/loader/loader.component.ts
index 24329432e..666d43bc3 100644
--- a/client/angular/videos/loader.component.ts
+++ b/client/app/videos/shared/loader/loader.component.ts
@@ -2,8 +2,8 @@ import { Component, Input } from '@angular/core';
2 2
3@Component({ 3@Component({
4 selector: 'my-loader', 4 selector: 'my-loader',
5 styleUrls: [ 'app/angular/videos/loader.component.css' ], 5 styleUrls: [ 'client/app/videos/shared/loader/loader.component.css' ],
6 templateUrl: 'app/angular/videos/loader.component.html' 6 templateUrl: 'client/app/videos/shared/loader/loader.component.html'
7}) 7})
8 8
9export class LoaderComponent { 9export class LoaderComponent {
diff --git a/client/angular/videos/pagination.ts b/client/app/videos/shared/pagination.model.ts
index 06f7a7875..06f7a7875 100644
--- a/client/angular/videos/pagination.ts
+++ b/client/app/videos/shared/pagination.model.ts
diff --git a/client/angular/videos/components/list/sort.ts b/client/app/videos/shared/sort-field.type.ts
index 6e8cc7936..6e8cc7936 100644
--- a/client/angular/videos/components/list/sort.ts
+++ b/client/app/videos/shared/sort-field.type.ts
diff --git a/client/angular/videos/video.ts b/client/app/videos/shared/video.model.ts
index eec537c9e..eec537c9e 100644
--- a/client/angular/videos/video.ts
+++ b/client/app/videos/shared/video.model.ts
diff --git a/client/angular/videos/videos.service.ts b/client/app/videos/shared/video.service.ts
index d5438fd82..78789c3cc 100644
--- a/client/angular/videos/videos.service.ts
+++ b/client/app/videos/shared/video.service.ts
@@ -2,14 +2,14 @@ import { Injectable } from '@angular/core';
2import { Http, Response, URLSearchParams } from '@angular/http'; 2import { Http, Response, URLSearchParams } from '@angular/http';
3import { Observable } from 'rxjs/Rx'; 3import { Observable } from 'rxjs/Rx';
4 4
5import { Pagination } from './pagination'; 5import { Pagination } from './pagination.model';
6import { Video } from './video'; 6import { Search } from '../../shared/index';
7import { AuthService } from '../users/services/auth.service'; 7import { SortField } from './sort-field.type';
8import { Search } from '../app/search'; 8import { AuthService } from '../../users/index';
9import { SortField } from './components/list/sort'; 9import { Video } from './video.model';
10 10
11@Injectable() 11@Injectable()
12export class VideosService { 12export class VideoService {
13 private _baseVideoUrl = '/api/v1/videos/'; 13 private _baseVideoUrl = '/api/v1/videos/';
14 14
15 constructor (private http: Http, private _authService: AuthService) {} 15 constructor (private http: Http, private _authService: AuthService) {}
diff --git a/client/app/videos/video-add/index.ts b/client/app/videos/video-add/index.ts
new file mode 100644
index 000000000..79488e851
--- /dev/null
+++ b/client/app/videos/video-add/index.ts
@@ -0,0 +1 @@
export * from './video-add.component';
diff --git a/client/angular/videos/components/add/videos-add.component.html b/client/app/videos/video-add/video-add.component.html
index 80d229cb8..80d229cb8 100644
--- a/client/angular/videos/components/add/videos-add.component.html
+++ b/client/app/videos/video-add/video-add.component.html
diff --git a/client/angular/videos/components/add/videos-add.component.scss b/client/app/videos/video-add/video-add.component.scss
index 01195f017..01195f017 100644
--- a/client/angular/videos/components/add/videos-add.component.scss
+++ b/client/app/videos/video-add/video-add.component.scss
diff --git a/client/angular/videos/components/add/videos-add.component.ts b/client/app/videos/video-add/video-add.component.ts
index f1652be19..ca583a103 100644
--- a/client/angular/videos/components/add/videos-add.component.ts
+++ b/client/app/videos/video-add/video-add.component.ts
@@ -1,24 +1,23 @@
1import { Component, ElementRef, OnInit } from '@angular/core'; 1import { Component, ElementRef, OnInit } from '@angular/core';
2import { Router } from '@angular/router-deprecated'; 2import { Router } from '@angular/router-deprecated';
3 3
4import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar';
5import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
5import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar';
6 6
7import { AuthService } from '../../../users/services/auth.service'; 7import { AuthService, User } from '../../users/index';
8import { User } from '../../../users/models/user';
9 8
10// TODO: import it with systemjs 9// TODO: import it with systemjs
11declare var jQuery:any; 10declare var jQuery:any;
12 11
13@Component({ 12@Component({
14 selector: 'my-videos-add', 13 selector: 'my-videos-add',
15 styleUrls: [ 'app/angular/videos/components/add/videos-add.component.css' ], 14 styleUrls: [ 'client/app/videos/video-add/video-add.component.css' ],
16 templateUrl: 'app/angular/videos/components/add/videos-add.component.html', 15 templateUrl: 'client/app/videos/video-add/video-add.component.html',
17 directives: [ PROGRESSBAR_DIRECTIVES ], 16 directives: [ PROGRESSBAR_DIRECTIVES ],
18 pipes: [ BytesPipe ] 17 pipes: [ BytesPipe ]
19}) 18})
20 19
21export class VideosAddComponent implements OnInit { 20export class VideoAddComponent implements OnInit {
22 user: User; 21 user: User;
23 fileToUpload: any; 22 fileToUpload: any;
24 progressBar: { value: number; max: number; } = { value: 0, max: 0 }; 23 progressBar: { value: number; max: number; } = { value: 0, max: 0 };
diff --git a/client/app/videos/video-list/index.ts b/client/app/videos/video-list/index.ts
new file mode 100644
index 000000000..1f6d6a4e7
--- /dev/null
+++ b/client/app/videos/video-list/index.ts
@@ -0,0 +1,3 @@
1export * from './video-list.component';
2export * from './video-miniature.component';
3export * from './video-sort.component';
diff --git a/client/angular/videos/components/list/videos-list.component.html b/client/app/videos/video-list/video-list.component.html
index edbbaf3ae..edbbaf3ae 100644
--- a/client/angular/videos/components/list/videos-list.component.html
+++ b/client/app/videos/video-list/video-list.component.html
diff --git a/client/angular/videos/components/list/videos-list.component.scss b/client/app/videos/video-list/video-list.component.scss
index 9441d80c3..9441d80c3 100644
--- a/client/angular/videos/components/list/videos-list.component.scss
+++ b/client/app/videos/video-list/video-list.component.scss
diff --git a/client/angular/videos/components/list/videos-list.component.ts b/client/app/videos/video-list/video-list.component.ts
index 56230e331..a88fb379a 100644
--- a/client/angular/videos/components/list/videos-list.component.ts
+++ b/client/app/videos/video-list/video-list.component.ts
@@ -1,27 +1,28 @@
1import { Component, OnInit } from '@angular/core'; 1import { Component, OnInit } from '@angular/core';
2import { ROUTER_DIRECTIVES, RouteParams, Router } from '@angular/router-deprecated'; 2import { Router, ROUTER_DIRECTIVES, RouteParams } from '@angular/router-deprecated';
3 3
4import { PAGINATION_DIRECTIVES } from 'ng2-bootstrap/components/pagination'; 4import { PAGINATION_DIRECTIVES } from 'ng2-bootstrap/components/pagination';
5 5
6import { AuthService } from '../../../users/services/auth.service'; 6import {
7import { Pagination } from '../../pagination'; 7 LoaderComponent,
8import { User } from '../../../users/models/user'; 8 Pagination,
9import { VideosService } from '../../videos.service'; 9 SortField,
10import { Video } from '../../video'; 10 Video,
11 VideoService
12} from '../shared/index';
13import { Search, SearchField } from '../../shared/index';
14import { AuthService, User } from '../../users/index';
11import { VideoMiniatureComponent } from './video-miniature.component'; 15import { VideoMiniatureComponent } from './video-miniature.component';
12import { Search, SearchField } from '../../../app/search';
13import { VideoSortComponent } from './video-sort.component'; 16import { VideoSortComponent } from './video-sort.component';
14import { SortField } from './sort';
15import { LoaderComponent } from '../../loader.component';
16 17
17@Component({ 18@Component({
18 selector: 'my-videos-list', 19 selector: 'my-videos-list',
19 styleUrls: [ 'app/angular/videos/components/list/videos-list.component.css' ], 20 styleUrls: [ 'client/app/videos/video-list/video-list.component.css' ],
20 templateUrl: 'app/angular/videos/components/list/videos-list.component.html', 21 templateUrl: 'client/app/videos/video-list/video-list.component.html',
21 directives: [ ROUTER_DIRECTIVES, PAGINATION_DIRECTIVES, VideoMiniatureComponent, VideoSortComponent, LoaderComponent ] 22 directives: [ ROUTER_DIRECTIVES, PAGINATION_DIRECTIVES, VideoMiniatureComponent, VideoSortComponent, LoaderComponent ]
22}) 23})
23 24
24export class VideosListComponent implements OnInit { 25export class VideoListComponent implements OnInit {
25 user: User = null; 26 user: User = null;
26 videos: Video[] = []; 27 videos: Video[] = [];
27 pagination: Pagination = { 28 pagination: Pagination = {
@@ -36,7 +37,7 @@ export class VideosListComponent implements OnInit {
36 37
37 constructor( 38 constructor(
38 private _authService: AuthService, 39 private _authService: AuthService,
39 private _videosService: VideosService, 40 private _videoService: VideoService,
40 private _routeParams: RouteParams, 41 private _routeParams: RouteParams,
41 private _router: Router 42 private _router: Router
42 ) { 43 ) {
@@ -63,9 +64,9 @@ export class VideosListComponent implements OnInit {
63 let observable = null; 64 let observable = null;
64 65
65 if (this.search.value !== null) { 66 if (this.search.value !== null) {
66 observable = this._videosService.searchVideos(this.search, this.pagination, this.sort); 67 observable = this._videoService.searchVideos(this.search, this.pagination, this.sort);
67 } else { 68 } else {
68 observable = this._videosService.getVideos(this.pagination, this.sort); 69 observable = this._videoService.getVideos(this.pagination, this.sort);
69 } 70 }
70 71
71 observable.subscribe( 72 observable.subscribe(
diff --git a/client/angular/videos/components/list/video-miniature.component.html b/client/app/videos/video-list/video-miniature.component.html
index 244254b5a..244254b5a 100644
--- a/client/angular/videos/components/list/video-miniature.component.html
+++ b/client/app/videos/video-list/video-miniature.component.html
diff --git a/client/angular/videos/components/list/video-miniature.component.scss b/client/app/videos/video-list/video-miniature.component.scss
index 4488abe22..4488abe22 100644
--- a/client/angular/videos/components/list/video-miniature.component.scss
+++ b/client/app/videos/video-list/video-miniature.component.scss
diff --git a/client/angular/videos/components/list/video-miniature.component.ts b/client/app/videos/video-list/video-miniature.component.ts
index 383c2c609..817636768 100644
--- a/client/angular/videos/components/list/video-miniature.component.ts
+++ b/client/app/videos/video-list/video-miniature.component.ts
@@ -1,15 +1,14 @@
1import { Component, Input, Output, EventEmitter } from '@angular/core';
2import { DatePipe } from '@angular/common'; 1import { DatePipe } from '@angular/common';
2import { Component, Input, Output, EventEmitter } from '@angular/core';
3import { ROUTER_DIRECTIVES } from '@angular/router-deprecated'; 3import { ROUTER_DIRECTIVES } from '@angular/router-deprecated';
4 4
5import { Video } from '../../video'; 5import { Video, VideoService } from '../shared/index';
6import { VideosService } from '../../videos.service'; 6import { User } from '../../users/index';
7import { User } from '../../../users/models/user';
8 7
9@Component({ 8@Component({
10 selector: 'my-video-miniature', 9 selector: 'my-video-miniature',
11 styleUrls: [ 'app/angular/videos/components/list/video-miniature.component.css' ], 10 styleUrls: [ 'client/app/videos/video-list/video-miniature.component.css' ],
12 templateUrl: 'app/angular/videos/components/list/video-miniature.component.html', 11 templateUrl: 'client/app/videos/video-list/video-miniature.component.html',
13 directives: [ ROUTER_DIRECTIVES ], 12 directives: [ ROUTER_DIRECTIVES ],
14 pipes: [ DatePipe ] 13 pipes: [ DatePipe ]
15}) 14})
@@ -22,7 +21,7 @@ export class VideoMiniatureComponent {
22 21
23 hovering: boolean = false; 22 hovering: boolean = false;
24 23
25 constructor(private _videosService: VideosService) {} 24 constructor(private _videoService: VideoService) {}
26 25
27 onHover() { 26 onHover() {
28 this.hovering = true; 27 this.hovering = true;
@@ -38,7 +37,7 @@ export class VideoMiniatureComponent {
38 37
39 removeVideo(id: string) { 38 removeVideo(id: string) {
40 if (confirm('Do you really want to remove this video?')) { 39 if (confirm('Do you really want to remove this video?')) {
41 this._videosService.removeVideo(id).subscribe( 40 this._videoService.removeVideo(id).subscribe(
42 status => this.removed.emit(true), 41 status => this.removed.emit(true),
43 error => alert(error) 42 error => alert(error)
44 ); 43 );
diff --git a/client/angular/videos/components/list/video-sort.component.html b/client/app/videos/video-list/video-sort.component.html
index 3bece0b22..3bece0b22 100644
--- a/client/angular/videos/components/list/video-sort.component.html
+++ b/client/app/videos/video-list/video-sort.component.html
diff --git a/client/angular/videos/components/list/video-sort.component.ts b/client/app/videos/video-list/video-sort.component.ts
index 0373cea38..d00d7ed49 100644
--- a/client/angular/videos/components/list/video-sort.component.ts
+++ b/client/app/videos/video-list/video-sort.component.ts
@@ -1,11 +1,11 @@
1import { Component, Input, Output, EventEmitter } from '@angular/core'; 1import { Component, EventEmitter, Input, Output } from '@angular/core';
2 2
3import { SortField } from './sort'; 3import { SortField } from '../shared/index';
4 4
5@Component({ 5@Component({
6 selector: 'my-video-sort', 6 selector: 'my-video-sort',
7 // styleUrls: [ 'app/angular/videos/components/list/video-sort.component.css' ], 7 // styleUrls: [ 'app/angular/videos/components/list/video-sort.component.css' ],
8 templateUrl: 'app/angular/videos/components/list/video-sort.component.html' 8 templateUrl: 'client/app/videos/video-list/video-sort.component.html'
9}) 9})
10 10
11export class VideoSortComponent { 11export class VideoSortComponent {
diff --git a/client/app/videos/video-watch/index.ts b/client/app/videos/video-watch/index.ts
new file mode 100644
index 000000000..2228b6ed7
--- /dev/null
+++ b/client/app/videos/video-watch/index.ts
@@ -0,0 +1 @@
export * from './video-watch.component';
diff --git a/client/angular/videos/components/watch/videos-watch.component.html b/client/app/videos/video-watch/video-watch.component.html
index 6c36b27e2..6c36b27e2 100644
--- a/client/angular/videos/components/watch/videos-watch.component.html
+++ b/client/app/videos/video-watch/video-watch.component.html
diff --git a/client/angular/videos/components/watch/videos-watch.component.scss b/client/app/videos/video-watch/video-watch.component.scss
index 1228d42f4..1228d42f4 100644
--- a/client/angular/videos/components/watch/videos-watch.component.scss
+++ b/client/app/videos/video-watch/video-watch.component.scss
diff --git a/client/angular/videos/components/watch/videos-watch.component.ts b/client/app/videos/video-watch/video-watch.component.ts
index e551e1f9a..891e6563f 100644
--- a/client/angular/videos/components/watch/videos-watch.component.ts
+++ b/client/app/videos/video-watch/video-watch.component.ts
@@ -1,25 +1,22 @@
1import { Component, OnInit, ElementRef } from '@angular/core'; 1import { Component, ElementRef, OnInit } from '@angular/core';
2import { RouteParams, CanDeactivate, ComponentInstruction } from '@angular/router-deprecated'; 2import { CanDeactivate, ComponentInstruction, RouteParams } from '@angular/router-deprecated';
3 3
4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
5 5
6import { LoaderComponent } from '../../loader.component'; 6import { LoaderComponent, Video, VideoService } from '../shared/index';
7 7
8// TODO import it with systemjs 8// TODO import it with systemjs
9declare var WebTorrent: any; 9declare var WebTorrent: any;
10 10
11import { Video } from '../../video';
12import { VideosService } from '../../videos.service';
13
14@Component({ 11@Component({
15 selector: 'my-video-watch', 12 selector: 'my-video-watch',
16 templateUrl: 'app/angular/videos/components/watch/videos-watch.component.html', 13 templateUrl: 'client/app/videos/video-watch/video-watch.component.html',
17 styleUrls: [ 'app/angular/videos/components/watch/videos-watch.component.css' ], 14 styleUrls: [ 'client/app/videos/video-watch/video-watch.component.css' ],
18 directives: [ LoaderComponent ], 15 directives: [ LoaderComponent ],
19 pipes: [ BytesPipe ] 16 pipes: [ BytesPipe ]
20}) 17})
21 18
22export class VideosWatchComponent implements OnInit, CanDeactivate { 19export class VideoWatchComponent implements OnInit, CanDeactivate {
23 video: Video; 20 video: Video;
24 downloadSpeed: number; 21 downloadSpeed: number;
25 uploadSpeed: number; 22 uploadSpeed: number;
@@ -30,7 +27,7 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
30 private client: any; 27 private client: any;
31 28
32 constructor( 29 constructor(
33 private _videosService: VideosService, 30 private _videoService: VideoService,
34 private _routeParams: RouteParams, 31 private _routeParams: RouteParams,
35 private _elementRef: ElementRef 32 private _elementRef: ElementRef
36 ) { 33 ) {
@@ -40,7 +37,7 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
40 37
41 ngOnInit() { 38 ngOnInit() {
42 let id = this._routeParams.get('id'); 39 let id = this._routeParams.get('id');
43 this._videosService.getVideo(id).subscribe( 40 this._videoService.getVideo(id).subscribe(
44 video => this.loadVideo(video), 41 video => this.loadVideo(video),
45 error => alert(error) 42 error => alert(error)
46 ); 43 );
diff --git a/client/index.html b/client/index.html
index db4b76613..bc750dde7 100644
--- a/client/index.html
+++ b/client/index.html
@@ -7,27 +7,27 @@
7 <meta charset="UTF-8"> 7 <meta charset="UTF-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1"> 8 <meta name="viewport" content="width=device-width, initial-scale=1">
9 9
10 <link rel="stylesheet" href="/app/stylesheets/index.css"> 10 <link rel="stylesheet" href="client/stylesheets/index.css">
11 11
12 <!-- 1. Load libraries --> 12 <!-- 1. Load libraries -->
13 <!-- IE required polyfills, in this exact order --> 13 <!-- IE required polyfills, in this exact order -->
14 <script src="/app/node_modules/es6-shim/es6-shim.min.js"></script> 14 <script src="client/node_modules/es6-shim/es6-shim.min.js"></script>
15 <script src="/app/node_modules/zone.js/dist/zone.js"></script> 15 <script src="client/node_modules/zone.js/dist/zone.js"></script>
16 <script src="/app/node_modules/reflect-metadata/Reflect.js"></script> 16 <script src="client/node_modules/reflect-metadata/Reflect.js"></script>
17 <script src="/app/node_modules/systemjs/dist/system.src.js"></script> 17 <script src="client/node_modules/systemjs/dist/system.src.js"></script>
18 18
19 <script src="/app/node_modules/jquery/dist/jquery.js"></script> 19 <script src="client/node_modules/jquery/dist/jquery.js"></script>
20 <script src="/app/node_modules/jquery.ui.widget/jquery.ui.widget.js"></script> 20 <script src="client/node_modules/jquery.ui.widget/jquery.ui.widget.js"></script>
21 <script src="/app/node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script> 21 <script src="client/node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>
22 22
23 <script src="/app/node_modules/webtorrent/webtorrent.min.js"></script> 23 <script src="client/node_modules/webtorrent/webtorrent.min.js"></script>
24 24
25 <script src="/app/node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script> 25 <script src="client/node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>
26 26
27 <!-- 2. Configure SystemJS --> 27 <!-- 2. Configure SystemJS -->
28 <script src="/app/systemjs.config.js"></script> 28 <script src="client/systemjs.config.js"></script>
29 <script> 29 <script>
30 System.import('app').catch(function(err){ console.error(err); }); 30 System.import('client').catch(function(err){ console.error(err); });
31 </script> 31 </script>
32 </head> 32 </head>
33 33
diff --git a/client/angular/main.ts b/client/main.ts
index e35f7dbdf..5e2ea0de0 100644
--- a/client/angular/main.ts
+++ b/client/main.ts
@@ -1,4 +1,5 @@
1import { bootstrap } from '@angular/platform-browser-dynamic'; 1import { bootstrap } from '@angular/platform-browser-dynamic';
2
2import { AppComponent } from './app/app.component'; 3import { AppComponent } from './app/app.component';
3 4
4bootstrap(AppComponent); 5bootstrap(AppComponent);
diff --git a/client/stylesheets/application.scss b/client/stylesheets/application.scss
index b91698056..98c1e37ad 100644
--- a/client/stylesheets/application.scss
+++ b/client/stylesheets/application.scss
@@ -1,4 +1,4 @@
1$icon-font-path: "/app/node_modules/bootstrap-sass/assets/fonts/bootstrap/"; 1$icon-font-path: "/client/node_modules/bootstrap-sass/assets/fonts/bootstrap/";
2 2
3@import "bootstrap-variables"; 3@import "bootstrap-variables";
4@import "_bootstrap"; 4@import "_bootstrap";
diff --git a/client/systemjs.config.js b/client/systemjs.config.js
index 82ca5bb70..d04bc4107 100644
--- a/client/systemjs.config.js
+++ b/client/systemjs.config.js
@@ -1,13 +1,12 @@
1;(function (global) { 1;(function (global) {
2 var map = { 2 var map = {
3 'app': 'app/angular', 3 'angular-pipes': 'client/node_modules/angular-pipes',
4 'angular-pipes': 'app/node_modules/angular-pipes', 4 'ng2-bootstrap': 'client/node_modules/ng2-bootstrap',
5 'ng2-bootstrap': 'app/node_modules/ng2-bootstrap', 5 'angular-rxjs.bundle': 'client/bundles/angular-rxjs.bundle.js'
6 'angular-rxjs.bundle': 'app/bundles/angular-rxjs.bundle.js'
7 } 6 }
8 7
9 var packages = { 8 var packages = {
10 'app': { main: 'main.js', defaultExtension: 'js' }, 9 'client': { main: 'main.js', defaultExtension: 'js' },
11 'ng2-bootstrap': { defaultExtension: 'js' }, 10 'ng2-bootstrap': { defaultExtension: 'js' },
12 'rxjs': { defaultExtension: 'js' } 11 'rxjs': { defaultExtension: 'js' }
13 } 12 }
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 8e786ca28..d48bd3920 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -20,26 +20,38 @@
20 ], 20 ],
21 "compileOnSave": false, 21 "compileOnSave": false,
22 "files": [ 22 "files": [
23 "angular/app/app.component.ts", 23 "app/app.component.ts",
24 "angular/app/search.component.ts", 24 "app/friends/friend.service.ts",
25 "angular/app/search.ts", 25 "app/friends/index.ts",
26 "angular/friends/services/friends.service.ts", 26 "app/shared/index.ts",
27 "angular/main.ts", 27 "app/shared/search-field.type.ts",
28 "angular/users/components/login/login.component.ts", 28 "app/shared/search.component.ts",
29 "angular/users/models/authStatus.ts", 29 "app/shared/search.model.ts",
30 "angular/users/models/token.ts", 30 "app/users/index.ts",
31 "angular/users/models/user.ts", 31 "app/users/login/index.ts",
32 "angular/users/services/auth.service.ts", 32 "app/users/login/login.component.ts",
33 "angular/videos/components/add/videos-add.component.ts", 33 "app/users/shared/auth-status.model.ts",
34 "angular/videos/components/list/sort.ts", 34 "app/users/shared/auth.service.ts",
35 "angular/videos/components/list/video-miniature.component.ts", 35 "app/users/shared/index.ts",
36 "angular/videos/components/list/video-sort.component.ts", 36 "app/users/shared/token.model.ts",
37 "angular/videos/components/list/videos-list.component.ts", 37 "app/users/shared/user.model.ts",
38 "angular/videos/components/watch/videos-watch.component.ts", 38 "app/videos/index.ts",
39 "angular/videos/loader.component.ts", 39 "app/videos/shared/index.ts",
40 "angular/videos/pagination.ts", 40 "app/videos/shared/loader/index.ts",
41 "angular/videos/video.ts", 41 "app/videos/shared/loader/loader.component.ts",
42 "angular/videos/videos.service.ts", 42 "app/videos/shared/pagination.model.ts",
43 "app/videos/shared/sort-field.type.ts",
44 "app/videos/shared/video.model.ts",
45 "app/videos/shared/video.service.ts",
46 "app/videos/video-add/index.ts",
47 "app/videos/video-add/video-add.component.ts",
48 "app/videos/video-list/index.ts",
49 "app/videos/video-list/video-list.component.ts",
50 "app/videos/video-list/video-miniature.component.ts",
51 "app/videos/video-list/video-sort.component.ts",
52 "app/videos/video-watch/index.ts",
53 "app/videos/video-watch/video-watch.component.ts",
54 "main.ts",
43 "typings/globals/es6-shim/index.d.ts", 55 "typings/globals/es6-shim/index.d.ts",
44 "typings/globals/jasmine/index.d.ts", 56 "typings/globals/jasmine/index.d.ts",
45 "typings/globals/node/index.d.ts", 57 "typings/globals/node/index.d.ts",
diff --git a/scripts/build/client/sass.sh b/scripts/build/client/sass.sh
index 0caa0df20..d8dfedca3 100755
--- a/scripts/build/client/sass.sh
+++ b/scripts/build/client/sass.sh
@@ -6,4 +6,4 @@ cd client || exit -1
6# Compile index and angular files 6# Compile index and angular files
7concurrently \ 7concurrently \
8 "node-sass --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \ 8 "node-sass --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \
9 "node-sass angular/ --output angular/" 9 "node-sass app/ --output app/"
diff --git a/scripts/clean/client/sass.sh b/scripts/clean/client/sass.sh
index 82c079f28..04d239ffc 100755
--- a/scripts/clean/client/sass.sh
+++ b/scripts/clean/client/sass.sh
@@ -2,4 +2,4 @@
2 2
3cd client || exit -1 3cd client || exit -1
4rm -f stylesheets/index.css 4rm -f stylesheets/index.css
5find angular -regextype posix-egrep -regex ".*\.(css)$" -exec rm -f {} \; 5find app -regextype posix-egrep -regex ".*\.(css)$" -exec rm -f {} \;
diff --git a/scripts/clean/client/tsc.sh b/scripts/clean/client/tsc.sh
index 3ea6e78d5..b17888640 100755
--- a/scripts/clean/client/tsc.sh
+++ b/scripts/clean/client/tsc.sh
@@ -1,5 +1,6 @@
1#!/usr/bin/env sh 1#!/usr/bin/env sh
2 2
3cd client || exit -1 3cd client || exit -1
4find angular -regextype posix-egrep -regex ".*\.(js|map)$" -exec rm -f {} \; 4find app -regextype posix-egrep -regex ".*\.(js|map)$" -exec rm -f {} \;
5rm -rf ./bundles 5rm -rf ./bundles
6rm -f main.js main.js.map
diff --git a/scripts/watch/client/livereload.sh b/scripts/watch/client/livereload.sh
index a4acc439c..5f095265e 100755
--- a/scripts/watch/client/livereload.sh
+++ b/scripts/watch/client/livereload.sh
@@ -1,3 +1,3 @@
1#!/usr/bin/env sh 1#!/usr/bin/env sh
2 2
3livereload client/angular -e scss 3livereload client/app -e scss
diff --git a/scripts/watch/client/sass.sh b/scripts/watch/client/sass.sh
index 22c536e38..f7a8c8a2b 100755
--- a/scripts/watch/client/sass.sh
+++ b/scripts/watch/client/sass.sh
@@ -4,4 +4,4 @@ cd client || exit -1
4 4
5concurrently \ 5concurrently \
6 "node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \ 6 "node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css" \
7 "node-sass -w angular/ --output angular/" 7 "node-sass -w app/ --output app/"
diff --git a/server.js b/server.js
index 024ce10f8..02c0d53cd 100644
--- a/server.js
+++ b/server.js
@@ -64,9 +64,9 @@ const apiRoute = '/api/' + constants.API_VERSION
64app.use(apiRoute, routes.api) 64app.use(apiRoute, routes.api)
65 65
66// Static files 66// Static files
67app.use('/app', express.static(path.join(__dirname, '/client'), { maxAge: 0 })) 67app.use('/client', express.static(path.join(__dirname, '/client'), { maxAge: 0 }))
68// 404 for static files not found 68// 404 for static files not found
69app.use('/app/*', function (req, res, next) { 69app.use('/client/*', function (req, res, next) {
70 res.sendStatus(404) 70 res.sendStatus(404)
71}) 71})
72 72