aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-06-03 22:08:03 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-06-03 22:08:03 +0200
commit4a6995be18b15de1834a39c8921a0e4109671bb6 (patch)
treeb659661cea33687fcc6bd8fc2251cb7a15ab9f9d
parent468892541175f9662f8b1b977e819dc1a496f282 (diff)
downloadPeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.gz
PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.zst
PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.zip
First draft to use webpack instead of systemjs
-rw-r--r--client/.bootstraprc125
-rw-r--r--client/.gitignore10
-rw-r--r--client/app/shared/index.ts2
-rw-r--r--client/app/videos/index.ts4
-rw-r--r--client/config/helpers.js17
-rw-r--r--client/config/webpack.common.js261
-rw-r--r--client/config/webpack.dev.js159
-rw-r--r--client/config/webpack.prod.js0
-rw-r--r--client/images/loading.gifbin673 -> 0 bytes
-rw-r--r--client/index.html36
-rw-r--r--client/package.json36
-rw-r--r--client/src/app/app.component.html (renamed from client/app/app.component.html)0
-rw-r--r--client/src/app/app.component.scss (renamed from client/app/app.component.scss)0
-rw-r--r--client/src/app/app.component.ts (renamed from client/app/app.component.ts)12
-rw-r--r--client/src/app/friends/friend.service.ts (renamed from client/app/friends/friend.service.ts)2
-rw-r--r--client/src/app/friends/index.ts (renamed from client/app/friends/index.ts)0
-rw-r--r--client/src/app/login/index.ts (renamed from client/app/login/index.ts)0
-rw-r--r--client/src/app/login/login.component.html (renamed from client/app/login/login.component.html)0
-rw-r--r--client/src/app/login/login.component.ts (renamed from client/app/login/login.component.ts)4
-rw-r--r--client/src/app/shared/index.ts2
-rw-r--r--client/src/app/shared/search/index.ts (renamed from client/app/shared/search/index.ts)0
-rw-r--r--client/src/app/shared/search/search-field.type.ts (renamed from client/app/shared/search/search-field.type.ts)0
-rw-r--r--client/src/app/shared/search/search.component.html (renamed from client/app/shared/search/search.component.html)0
-rw-r--r--client/src/app/shared/search/search.component.ts (renamed from client/app/shared/search/search.component.ts)2
-rw-r--r--client/src/app/shared/search/search.model.ts (renamed from client/app/shared/search/search.model.ts)0
-rw-r--r--client/src/app/shared/users/auth-status.model.ts (renamed from client/app/shared/users/auth-status.model.ts)0
-rw-r--r--client/src/app/shared/users/auth.service.ts (renamed from client/app/shared/users/auth.service.ts)0
-rw-r--r--client/src/app/shared/users/index.ts (renamed from client/app/shared/users/index.ts)0
-rw-r--r--client/src/app/shared/users/token.model.ts (renamed from client/app/shared/users/token.model.ts)0
-rw-r--r--client/src/app/shared/users/user.model.ts (renamed from client/app/shared/users/user.model.ts)0
-rw-r--r--client/src/app/videos/index.ts4
-rw-r--r--client/src/app/videos/shared/index.ts (renamed from client/app/videos/shared/index.ts)2
-rw-r--r--client/src/app/videos/shared/loader/index.ts (renamed from client/app/videos/shared/loader/index.ts)0
-rw-r--r--client/src/app/videos/shared/loader/loader.component.html (renamed from client/app/videos/shared/loader/loader.component.html)0
-rw-r--r--client/src/app/videos/shared/loader/loader.component.scss (renamed from client/app/videos/shared/loader/loader.component.scss)0
-rw-r--r--client/src/app/videos/shared/loader/loader.component.ts (renamed from client/app/videos/shared/loader/loader.component.ts)4
-rw-r--r--client/src/app/videos/shared/pagination.model.ts (renamed from client/app/videos/shared/pagination.model.ts)0
-rw-r--r--client/src/app/videos/shared/sort-field.type.ts (renamed from client/app/videos/shared/sort-field.type.ts)0
-rw-r--r--client/src/app/videos/shared/video.model.ts (renamed from client/app/videos/shared/video.model.ts)0
-rw-r--r--client/src/app/videos/shared/video.service.ts (renamed from client/app/videos/shared/video.service.ts)4
-rw-r--r--client/src/app/videos/video-add/index.ts (renamed from client/app/videos/video-add/index.ts)0
-rw-r--r--client/src/app/videos/video-add/video-add.component.html (renamed from client/app/videos/video-add/video-add.component.html)0
-rw-r--r--client/src/app/videos/video-add/video-add.component.scss (renamed from client/app/videos/video-add/video-add.component.scss)0
-rw-r--r--client/src/app/videos/video-add/video-add.component.ts (renamed from client/app/videos/video-add/video-add.component.ts)10
-rw-r--r--client/src/app/videos/video-list/index.ts (renamed from client/app/videos/video-list/index.ts)0
-rw-r--r--client/src/app/videos/video-list/video-list.component.html (renamed from client/app/videos/video-list/video-list.component.html)0
-rw-r--r--client/src/app/videos/video-list/video-list.component.scss (renamed from client/app/videos/video-list/video-list.component.scss)0
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts (renamed from client/app/videos/video-list/video-list.component.ts)8
-rw-r--r--client/src/app/videos/video-list/video-miniature.component.html (renamed from client/app/videos/video-list/video-miniature.component.html)0
-rw-r--r--client/src/app/videos/video-list/video-miniature.component.scss (renamed from client/app/videos/video-list/video-miniature.component.scss)0
-rw-r--r--client/src/app/videos/video-list/video-miniature.component.ts (renamed from client/app/videos/video-list/video-miniature.component.ts)8
-rw-r--r--client/src/app/videos/video-list/video-sort.component.html (renamed from client/app/videos/video-list/video-sort.component.html)0
-rw-r--r--client/src/app/videos/video-list/video-sort.component.ts (renamed from client/app/videos/video-list/video-sort.component.ts)4
-rw-r--r--client/src/app/videos/video-watch/index.ts (renamed from client/app/videos/video-watch/index.ts)0
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.html (renamed from client/app/videos/video-watch/video-watch.component.html)0
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.scss (renamed from client/app/videos/video-watch/video-watch.component.scss)0
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts (renamed from client/app/videos/video-watch/video-watch.component.ts)6
-rw-r--r--client/src/app/videos/video-watch/webtorrent.service.ts (renamed from client/app/videos/video-watch/webtorrent.service.ts)2
-rw-r--r--client/src/assets/favicon.png (renamed from client/images/favicon.png)bin2335 -> 2335 bytes
-rw-r--r--client/src/custom-typings.d.ts119
-rw-r--r--client/src/index.html17
-rw-r--r--client/src/main.ts (renamed from client/main.ts)5
-rw-r--r--client/src/polyfills.ts28
-rw-r--r--client/src/sass/application.scss (renamed from client/stylesheets/base.scss)0
-rw-r--r--client/src/sass/pre-customizations.scss1
-rw-r--r--client/src/vendor.ts28
-rw-r--r--client/stylesheets/application.scss5
-rw-r--r--client/stylesheets/bootstrap-variables.scss875
-rw-r--r--client/systemjs.bundle.js15
-rw-r--r--client/systemjs.config.js48
-rw-r--r--client/tsconfig.json69
-rw-r--r--client/webpack.config.js16
-rw-r--r--server.js4
73 files changed, 888 insertions, 1066 deletions
diff --git a/client/.bootstraprc b/client/.bootstraprc
new file mode 100644
index 000000000..a4d4fe689
--- /dev/null
+++ b/client/.bootstraprc
@@ -0,0 +1,125 @@
1---
2# Output debugging info
3# loglevel: debug
4
5# Major version of Bootstrap: 3 or 4
6bootstrapVersion: 3
7
8# If Bootstrap version 3 is used - turn on/off custom icon font path
9useCustomIconFontPath: true
10
11# Webpack loaders, order matters
12styleLoaders:
13 - style
14 - css
15 - sass
16
17# Extract styles to stand-alone css file
18# Different settings for different environments can be used,
19# It depends on value of NODE_ENV environment variable
20# This param can also be set in webpack config:
21# entry: 'bootstrap-loader/extractStyles'
22extractStyles: false
23# env:
24# development:
25# extractStyles: false
26# production:
27# extractStyles: true
28
29# Customize Bootstrap variables that get imported before the original Bootstrap variables.
30# Thus original Bootstrap variables can depend on values from here. All the bootstrap
31# variables are configured with !default, and thus, if you define the variable here, then
32# that value is used, rather than the default. However, many bootstrap variables are derived
33# from other bootstrap variables, and thus, you want to set this up before we load the
34# official bootstrap versions.
35# For example, _variables.scss contains:
36# $input-color: $gray !default;
37# This means you can define $input-color before we load _variables.scss
38preBootstrapCustomizations: ./src/sass/pre-customizations.scss
39
40# This gets loaded after bootstrap/variables is loaded and before bootstrap is loaded.
41# A good example of this is when you want to override a bootstrap variable to be based
42# on the default value of bootstrap. This is pretty specialized case. Thus, you normally
43# just override bootrap variables in preBootstrapCustomizations so that derived
44# variables will use your definition.
45#
46# For example, in _variables.scss:
47# $input-height: (($font-size-base * $line-height) + ($input-padding-y * 2) + ($border-width * 2)) !default;
48# This means that you could define this yourself in preBootstrapCustomizations. Or you can do
49# this in bootstrapCustomizations to make the input height 10% bigger than the default calculation.
50# Thus you can leverage the default calculations.
51# $input-height: $input-height * 1.10;
52# bootstrapCustomizations: ./app/styles/bootstrap/customizations.scss
53
54# Import your custom styles here. You have access to all the bootstrap variables. If you require
55# your sass files separately, you will not have access to the bootstrap variables, mixins, clases, etc.
56# Usually this endpoint-file contains list of @imports of your application styles.
57appStyles: ./src/sass/application.scss
58
59### Bootstrap styles
60styles:
61
62 # Mixins
63 mixins: true
64
65 # Reset and dependencies
66 normalize: true
67 print: true
68 glyphicons: true
69
70 # Core CSS
71 scaffolding: true
72 type: true
73 code: false
74 grid: true
75 tables: true
76 forms: true
77 buttons: true
78
79 # Components
80 component-animations: false
81 dropdowns: true
82 button-groups: true
83 input-groups: true
84 navs: false
85 navbar: false
86 breadcrumbs: false
87 pagination: true
88 pager: false
89 labels: false
90 badges: false
91 jumbotron: false
92 thumbnails: true
93 alerts: false
94 progress-bars: true
95 media: true
96 list-group: false
97 panels: false
98 wells: false
99 responsive-embed: false
100 close: false
101
102 # Components w/ JavaScript
103 modals: false
104 tooltip: false
105 popovers: false
106 carousel: false
107
108 # Utility classes
109 utilities: true
110 responsive-utilities: true
111
112### Bootstrap scripts
113scripts:
114 transition: false
115 alert: false
116 button: false
117 carousel: false
118 collapse: false
119 dropdown: false
120 modal: false
121 tooltip: false
122 popover: false
123 scrollspy: false
124 tab: false
125 affix: false
diff --git a/client/.gitignore b/client/.gitignore
index 81e4a1cf7..b20541002 100644
--- a/client/.gitignore
+++ b/client/.gitignore
@@ -1,8 +1,2 @@
1typings 1dist/
2app/**/*.js 2typings/
3app/**/*.map
4app/**/*.css
5stylesheets/index.css
6bundles
7main.js
8main.js.map
diff --git a/client/app/shared/index.ts b/client/app/shared/index.ts
deleted file mode 100644
index ad3ee0098..000000000
--- a/client/app/shared/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
1export * from './search/index';
2export * from './users/index'
diff --git a/client/app/videos/index.ts b/client/app/videos/index.ts
deleted file mode 100644
index 1c80ac5e5..000000000
--- a/client/app/videos/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
1export * from './shared/index';
2export * from './video-add/index';
3export * from './video-list/index';
4export * from './video-watch/index';
diff --git a/client/config/helpers.js b/client/config/helpers.js
new file mode 100644
index 000000000..24d7dae9f
--- /dev/null
+++ b/client/config/helpers.js
@@ -0,0 +1,17 @@
1const path = require('path')
2
3const ROOT = path.resolve(__dirname, '..')
4
5console.log('root directory:', root() + '\n')
6
7function hasProcessFlag (flag) {
8 return process.argv.join('').indexOf(flag) > -1
9}
10
11function root (args) {
12 args = Array.prototype.slice.call(arguments, 0)
13 return path.join.apply(path, [ROOT].concat(args))
14}
15
16exports.hasProcessFlag = hasProcessFlag
17exports.root = root
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js
new file mode 100644
index 000000000..5f3f44bb1
--- /dev/null
+++ b/client/config/webpack.common.js
@@ -0,0 +1,261 @@
1const webpack = require('webpack')
2const helpers = require('./helpers')
3
4/*
5 * Webpack Plugins
6 */
7
8var CopyWebpackPlugin = (CopyWebpackPlugin = require('copy-webpack-plugin'), CopyWebpackPlugin.default || CopyWebpackPlugin)
9const HtmlWebpackPlugin = require('html-webpack-plugin')
10const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin
11
12/*
13 * Webpack Constants
14 */
15const METADATA = {
16 title: 'PeerTube',
17 baseUrl: '/'
18}
19
20/*
21 * Webpack configuration
22 *
23 * See: http://webpack.github.io/docs/configuration.html#cli
24 */
25module.exports = {
26 /*
27 * Static metadata for index.html
28 *
29 * See: (custom attribute)
30 */
31 metadata: METADATA,
32
33 /*
34 * Cache generated modules and chunks to improve performance for multiple incremental builds.
35 * This is enabled by default in watch mode.
36 * You can pass false to disable it.
37 *
38 * See: http://webpack.github.io/docs/configuration.html#cache
39 */
40 // cache: false,
41
42 /*
43 * The entry point for the bundle
44 * Our Angular.js app
45 *
46 * See: http://webpack.github.io/docs/configuration.html#entry
47 */
48 entry: {
49 'polyfills': './src/polyfills.ts',
50 'vendor': './src/vendor.ts',
51 'main': './src/main.ts'
52 },
53
54 /*
55 * Options affecting the resolving of modules.
56 *
57 * See: http://webpack.github.io/docs/configuration.html#resolve
58 */
59 resolve: {
60 /*
61 * An array of extensions that should be used to resolve modules.
62 *
63 * See: http://webpack.github.io/docs/configuration.html#resolve-extensions
64 */
65 extensions: [ '', '.ts', '.js', '.scss' ],
66
67 // Make sure root is src
68 root: helpers.root('src'),
69
70 // remove other default values
71 modulesDirectories: [ 'node_modules' ]
72
73 },
74
75 /*
76 * Options affecting the normal modules.
77 *
78 * See: http://webpack.github.io/docs/configuration.html#module
79 */
80 module: {
81 /*
82 * An array of applied pre and post loaders.
83 *
84 * See: http://webpack.github.io/docs/configuration.html#module-preloaders-module-postloaders
85 */
86 preLoaders: [
87
88 /*
89 * Tslint loader support for *.ts files
90 *
91 * See: https://github.com/wbuchwalter/tslint-loader
92 */
93 // { test: /\.ts$/, loader: 'tslint-loader', exclude: [ helpers.root('node_modules') ] },
94
95 /*
96 * Source map loader support for *.js files
97 * Extracts SourceMaps for source files that as added as sourceMappingURL comment.
98 *
99 * See: https://github.com/webpack/source-map-loader
100 */
101 {
102 test: /\.js$/,
103 loader: 'source-map-loader',
104 exclude: [
105 // these packages have problems with their sourcemaps
106 helpers.root('node_modules/rxjs'),
107 helpers.root('node_modules/@angular')
108 ]
109 }
110
111 ],
112
113 /*
114 * An array of automatically applied loaders.
115 *
116 * IMPORTANT: The loaders here are resolved relative to the resource which they are applied to.
117 * This means they are not resolved relative to the configuration file.
118 *
119 * See: http://webpack.github.io/docs/configuration.html#module-loaders
120 */
121 loaders: [
122
123 /*
124 * Typescript loader support for .ts and Angular 2 async routes via .async.ts
125 *
126 * See: https://github.com/s-panferov/awesome-typescript-loader
127 */
128 {
129 test: /\.ts$/,
130 loader: 'awesome-typescript-loader',
131 exclude: [/\.(spec|e2e)\.ts$/]
132 },
133
134 /*
135 * Json loader support for *.json files.
136 *
137 * See: https://github.com/webpack/json-loader
138 */
139 {
140 test: /\.json$/,
141 loader: 'json-loader'
142 },
143
144 /*
145 * Raw loader support for *.css files
146 * Returns file content as string
147 *
148 * See: https://github.com/webpack/raw-loader
149 */
150 {
151 test: /\.scss$/,
152 exclude: /node_modules/,
153 loaders: [ 'raw-loader', 'sass-loader' ]
154 },
155
156 {
157 test: /\.(woff2?|ttf|eot|svg)$/,
158 loader: 'url?limit=10000&name=assets/fonts/[hash].[ext]'
159 },
160
161 /* Raw loader support for *.html
162 * Returns file content as string
163 *
164 * See: https://github.com/webpack/raw-loader
165 */
166 {
167 test: /\.html$/,
168 loader: 'raw-loader',
169 exclude: [ helpers.root('src/index.html') ]
170 }
171
172 ]
173
174 },
175
176 /*
177 * Add additional plugins to the compiler.
178 *
179 * See: http://webpack.github.io/docs/configuration.html#plugins
180 */
181 plugins: [
182
183 /*
184 * Plugin: ForkCheckerPlugin
185 * Description: Do type checking in a separate process, so webpack don't need to wait.
186 *
187 * See: https://github.com/s-panferov/awesome-typescript-loader#forkchecker-boolean-defaultfalse
188 */
189 new ForkCheckerPlugin(),
190
191 /*
192 * Plugin: OccurenceOrderPlugin
193 * Description: Varies the distribution of the ids to get the smallest id length
194 * for often used ids.
195 *
196 * See: https://webpack.github.io/docs/list-of-plugins.html#occurrenceorderplugin
197 * See: https://github.com/webpack/docs/wiki/optimization#minimize
198 */
199 new webpack.optimize.OccurenceOrderPlugin(true),
200
201 /*
202 * Plugin: CommonsChunkPlugin
203 * Description: Shares common code between the pages.
204 * It identifies common modules and put them into a commons chunk.
205 *
206 * See: https://webpack.github.io/docs/list-of-plugins.html#commonschunkplugin
207 * See: https://github.com/webpack/docs/wiki/optimization#multi-page-app
208 */
209 new webpack.optimize.CommonsChunkPlugin({
210 name: [ 'polyfills', 'vendor' ].reverse()
211 }),
212
213 /*
214 * Plugin: CopyWebpackPlugin
215 * Description: Copy files and directories in webpack.
216 *
217 * Copies project static assets.
218 *
219 * See: https://www.npmjs.com/package/copy-webpack-plugin
220 */
221 new CopyWebpackPlugin([{
222 from: 'src/assets',
223 to: 'assets'
224 }]),
225
226 /*
227 * Plugin: HtmlWebpackPlugin
228 * Description: Simplifies creation of HTML files to serve your webpack bundles.
229 * This is especially useful for webpack bundles that include a hash in the filename
230 * which changes every compilation.
231 *
232 * See: https://github.com/ampedandwired/html-webpack-plugin
233 */
234 new HtmlWebpackPlugin({
235 template: 'src/index.html',
236 chunksSortMode: 'dependency'
237 }),
238
239 new webpack.ProvidePlugin({
240 jQuery: 'jquery',
241 $: 'jquery',
242 jquery: 'jquery'
243 })
244
245 ],
246
247 /*
248 * Include polyfills or mocks for various node stuff
249 * Description: Node configuration
250 *
251 * See: https://webpack.github.io/docs/configuration.html#node
252 */
253 node: {
254 global: 'window',
255 crypto: 'empty',
256 module: false,
257 clearImmediate: false,
258 setImmediate: false
259 }
260
261}
diff --git a/client/config/webpack.dev.js b/client/config/webpack.dev.js
new file mode 100644
index 000000000..19768d872
--- /dev/null
+++ b/client/config/webpack.dev.js
@@ -0,0 +1,159 @@
1const helpers = require('./helpers')
2const webpackMerge = require('webpack-merge') // used to merge webpack configs
3const commonConfig = require('./webpack.common.js') // the settings that are common to prod and dev
4
5/**
6 * Webpack Plugins
7 */
8const DefinePlugin = require('webpack/lib/DefinePlugin')
9
10/**
11 * Webpack Constants
12 */
13const ENV = process.env.ENV = process.env.NODE_ENV = 'development'
14const HMR = helpers.hasProcessFlag('hot')
15const METADATA = webpackMerge(commonConfig.metadata, {
16 host: 'localhost',
17 port: 3000,
18 ENV: ENV,
19 HMR: HMR
20})
21
22/**
23 * Webpack configuration
24 *
25 * See: http://webpack.github.io/docs/configuration.html#cli
26 */
27module.exports = webpackMerge(commonConfig, {
28 /**
29 * Merged metadata from webpack.common.js for index.html
30 *
31 * See: (custom attribute)
32 */
33 metadata: METADATA,
34
35 /**
36 * Switch loaders to debug mode.
37 *
38 * See: http://webpack.github.io/docs/configuration.html#debug
39 */
40 debug: true,
41
42 /**
43 * Developer tool to enhance debugging
44 *
45 * See: http://webpack.github.io/docs/configuration.html#devtool
46 * See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
47 */
48 devtool: 'cheap-module-source-map',
49
50 /**
51 * Options affecting the output of the compilation.
52 *
53 * See: http://webpack.github.io/docs/configuration.html#output
54 */
55 output: {
56 /**
57 * The output directory as absolute path (required).
58 *
59 * See: http://webpack.github.io/docs/configuration.html#output-path
60 */
61 path: helpers.root('dist'),
62
63 /**
64 * Specifies the name of each output file on disk.
65 * IMPORTANT: You must not specify an absolute path here!
66 *
67 * See: http://webpack.github.io/docs/configuration.html#output-filename
68 */
69 filename: '[name].bundle.js',
70
71 /**
72 * The filename of the SourceMaps for the JavaScript files.
73 * They are inside the output.path directory.
74 *
75 * See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename
76 */
77 sourceMapFilename: '[name].map',
78
79 /** The filename of non-entry chunks as relative path
80 * inside the output.path directory.
81 *
82 * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
83 */
84 chunkFilename: '[id].chunk.js',
85
86 publicPath: '/client/'
87
88 },
89
90 plugins: [
91
92 /**
93 * Plugin: DefinePlugin
94 * Description: Define free variables.
95 * Useful for having development builds with debug logging or adding global constants.
96 *
97 * Environment helpers
98 *
99 * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
100 */
101 // NOTE: when adding more properties, make sure you include them in custom-typings.d.ts
102 new DefinePlugin({
103 'ENV': JSON.stringify(METADATA.ENV),
104 'HMR': METADATA.HMR,
105 'process.env': {
106 'ENV': JSON.stringify(METADATA.ENV),
107 'NODE_ENV': JSON.stringify(METADATA.ENV),
108 'HMR': METADATA.HMR
109 }
110 })
111 ],
112
113 /**
114 * Static analysis linter for TypeScript advanced options configuration
115 * Description: An extensible linter for the TypeScript language.
116 *
117 * See: https://github.com/wbuchwalter/tslint-loader
118 */
119 tslint: {
120 emitErrors: false,
121 failOnHint: false,
122 resourcePath: 'src'
123 },
124
125 /**
126 * Webpack Development Server configuration
127 * Description: The webpack-dev-server is a little node.js Express server.
128 * The server emits information about the compilation state to the client,
129 * which reacts to those events.
130 *
131 * See: https://webpack.github.io/docs/webpack-dev-server.html
132 */
133 devServer: {
134 port: METADATA.port,
135 host: METADATA.host,
136 historyApiFallback: true,
137 watchOptions: {
138 aggregateTimeout: 300,
139 poll: 1000
140 },
141 outputPath: helpers.root('dist')
142 },
143
144 /*
145 * Include polyfills or mocks for various node stuff
146 * Description: Node configuration
147 *
148 * See: https://webpack.github.io/docs/configuration.html#node
149 */
150 node: {
151 global: 'window',
152 crypto: 'empty',
153 process: true,
154 module: false,
155 clearImmediate: false,
156 setImmediate: false
157 }
158
159})
diff --git a/client/config/webpack.prod.js b/client/config/webpack.prod.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/client/config/webpack.prod.js
diff --git a/client/images/loading.gif b/client/images/loading.gif
deleted file mode 100644
index f2a1bc0c6..000000000
--- a/client/images/loading.gif
+++ /dev/null
Binary files differ
diff --git a/client/index.html b/client/index.html
deleted file mode 100644
index 6fbcd1fa6..000000000
--- a/client/index.html
+++ /dev/null
@@ -1,36 +0,0 @@
1<html>
2 <head>
3 <base href="/">
4
5 <title>PeerTube</title>
6
7 <meta charset="UTF-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1">
9
10 <link rel="stylesheet" href="client/stylesheets/index.css">
11
12 <!-- 1. Load libraries -->
13 <!-- IE required polyfills, in this exact order -->
14 <script src="client/node_modules/es6-shim/es6-shim.min.js"></script>
15 <script src="client/node_modules/zone.js/dist/zone.js"></script>
16 <script src="client/node_modules/reflect-metadata/Reflect.js"></script>
17 <script src="client/node_modules/systemjs/dist/system.src.js"></script>
18
19 <script src="client/node_modules/jquery/dist/jquery.js"></script>
20 <script src="client/node_modules/jquery.ui.widget/jquery.ui.widget.js"></script>
21 <script src="client/node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>
22
23 <script src="client/node_modules/webtorrent/webtorrent.min.js"></script>
24
25 <!-- 2. Configure SystemJS -->
26 <script src="client/systemjs.config.js"></script>
27 <script>
28 System.import('client').catch(function(err){ console.error(err); });
29 </script>
30 </head>
31
32 <!-- 3. Display the application -->
33 <body>
34 <my-app>Loading...</my-app>
35 </body>
36</html>
diff --git a/client/package.json b/client/package.json
index dea673357..bfdfe5574 100644
--- a/client/package.json
+++ b/client/package.json
@@ -13,11 +13,11 @@
13 "url": "git://github.com/Chocobozzz/PeerTube.git" 13 "url": "git://github.com/Chocobozzz/PeerTube.git"
14 }, 14 },
15 "scripts": { 15 "scripts": {
16 "tsc": "tsc",
17 "tsc:w": "tsc -w",
18 "typings": "typings", 16 "typings": "typings",
19 "postinstall": "typings install", 17 "postinstall": "typings install",
20 "test": "standard && tslint -c ./tslint.json angular/**/*.ts" 18 "test": "standard && tslint -c ./tslint.json angular/**/*.ts",
19 "build": "webpack --config config/webpack.dev.js --progress --profile --colors --display-error-details --display-cached",
20 "watch": "npm run build -- --watch"
21 }, 21 },
22 "license": "GPLv3", 22 "license": "GPLv3",
23 "dependencies": { 23 "dependencies": {
@@ -30,12 +30,15 @@
30 "@angular/router-deprecated": "2.0.0-rc.1", 30 "@angular/router-deprecated": "2.0.0-rc.1",
31 "angular-pipes": "^2.0.0", 31 "angular-pipes": "^2.0.0",
32 "blueimp-file-upload": "^9.12.1", 32 "blueimp-file-upload": "^9.12.1",
33 "bootstrap-loader": "^1.0.8",
33 "bootstrap-sass": "^3.3.6", 34 "bootstrap-sass": "^3.3.6",
35 "core-js": "^2.4.0",
34 "es6-promise": "^3.0.2", 36 "es6-promise": "^3.0.2",
35 "es6-shim": "^0.35.0", 37 "es6-shim": "^0.35.0",
36 "jquery": "^2.2.3", 38 "jquery": "^2.2.3",
37 "jquery.ui.widget": "^1.10.3", 39 "jquery.ui.widget": "^1.10.3",
38 "ng2-bootstrap": "^1.0.16", 40 "ng2-bootstrap": "^1.0.16",
41 "normalize.css": "^4.1.1",
39 "reflect-metadata": "0.1.3", 42 "reflect-metadata": "0.1.3",
40 "rxjs": "5.0.0-beta.6", 43 "rxjs": "5.0.0-beta.6",
41 "systemjs": "0.19.27", 44 "systemjs": "0.19.27",
@@ -43,12 +46,37 @@
43 "zone.js": "0.6.12" 46 "zone.js": "0.6.12"
44 }, 47 },
45 "devDependencies": { 48 "devDependencies": {
49 "awesome-typescript-loader": "^0.17.0",
46 "codelyzer": "0.0.19", 50 "codelyzer": "0.0.19",
51 "compression-webpack-plugin": "^0.3.1",
52 "copy-webpack-plugin": "^3.0.1",
53 "css-loader": "^0.23.1",
54 "es6-promise-loader": "^1.0.1",
55 "exports-loader": "^0.6.3",
56 "expose-loader": "^0.7.1",
57 "file-loader": "^0.8.5",
58 "html-webpack-plugin": "^2.19.0",
59 "imports-loader": "^0.6.5",
60 "json-loader": "^0.5.4",
61 "node-sass": "^3.7.0",
62 "raw-loader": "^0.5.1",
63 "resolve-url-loader": "^1.4.3",
64 "sass-loader": "^3.2.0",
65 "source-map-loader": "^0.1.5",
47 "standard": "^7.0.1", 66 "standard": "^7.0.1",
67 "style-loader": "^0.13.1",
48 "systemjs-builder": "^0.15.16", 68 "systemjs-builder": "^0.15.16",
69 "ts-helpers": "^1.1.1",
70 "ts-node": "^0.7.3",
49 "tslint": "^3.7.4", 71 "tslint": "^3.7.4",
72 "tslint-loader": "^2.1.4",
50 "typescript": "^1.8.10", 73 "typescript": "^1.8.10",
51 "typings": "^1.0.4" 74 "typings": "^1.0.4",
75 "url-loader": "^0.5.7",
76 "webpack": "^1.13.1",
77 "webpack-dev-server": "^1.14.1",
78 "webpack-md5-hash": "0.0.5",
79 "webpack-merge": "^0.13.0"
52 }, 80 },
53 "standard": { 81 "standard": {
54 "ignore": [ 82 "ignore": [
diff --git a/client/app/app.component.html b/client/src/app/app.component.html
index 48e97d523..48e97d523 100644
--- a/client/app/app.component.html
+++ b/client/src/app/app.component.html
diff --git a/client/app/app.component.scss b/client/src/app/app.component.scss
index e02c2d5b0..e02c2d5b0 100644
--- a/client/app/app.component.scss
+++ b/client/src/app/app.component.scss
diff --git a/client/app/app.component.ts b/client/src/app/app.component.ts
index 94924a47a..81b700a21 100644
--- a/client/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -2,20 +2,20 @@ import { Component } from '@angular/core';
2import { HTTP_PROVIDERS } from '@angular/http'; 2import { HTTP_PROVIDERS } from '@angular/http';
3import { RouteConfig, Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated'; 3import { RouteConfig, Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated';
4 4
5import { FriendService } from './friends/index'; 5import { FriendService } from './friends';
6import { LoginComponent } from './login/index'; 6import { LoginComponent } from './login';
7import { 7import {
8 AuthService, 8 AuthService,
9 AuthStatus, 9 AuthStatus,
10 Search, 10 Search,
11 SearchComponent 11 SearchComponent
12} from './shared/index'; 12} from './shared';
13import { 13import {
14 VideoAddComponent, 14 VideoAddComponent,
15 VideoListComponent, 15 VideoListComponent,
16 VideoWatchComponent, 16 VideoWatchComponent,
17 VideoService 17 VideoService
18} from './videos/index'; 18} from './videos';
19 19
20@RouteConfig([ 20@RouteConfig([
21 { 21 {
@@ -43,8 +43,8 @@ import {
43 43
44@Component({ 44@Component({
45 selector: 'my-app', 45 selector: 'my-app',
46 templateUrl: 'client/app/app.component.html', 46 template: require('./app.component.html'),
47 styleUrls: [ 'client/app/app.component.css' ], 47 styles: [ require('./app.component.scss') ],
48 directives: [ ROUTER_DIRECTIVES, SearchComponent ], 48 directives: [ ROUTER_DIRECTIVES, SearchComponent ],
49 providers: [ AuthService, FriendService, HTTP_PROVIDERS, ROUTER_PROVIDERS, VideoService ] 49 providers: [ AuthService, FriendService, HTTP_PROVIDERS, ROUTER_PROVIDERS, VideoService ]
50}) 50})
diff --git a/client/app/friends/friend.service.ts b/client/src/app/friends/friend.service.ts
index d3684f08d..a8b1a1bd3 100644
--- a/client/app/friends/friend.service.ts
+++ b/client/src/app/friends/friend.service.ts
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
2import { Http, Response } from '@angular/http'; 2import { Http, Response } from '@angular/http';
3import { Observable } from 'rxjs/Rx'; 3import { Observable } from 'rxjs/Rx';
4 4
5import { AuthService } from '../shared/index'; 5import { AuthService } from '../shared';
6 6
7@Injectable() 7@Injectable()
8export class FriendService { 8export class FriendService {
diff --git a/client/app/friends/index.ts b/client/src/app/friends/index.ts
index 0adc256c4..0adc256c4 100644
--- a/client/app/friends/index.ts
+++ b/client/src/app/friends/index.ts
diff --git a/client/app/login/index.ts b/client/src/app/login/index.ts
index 69c16441f..69c16441f 100644
--- a/client/app/login/index.ts
+++ b/client/src/app/login/index.ts
diff --git a/client/app/login/login.component.html b/client/src/app/login/login.component.html
index 940694515..940694515 100644
--- a/client/app/login/login.component.html
+++ b/client/src/app/login/login.component.html
diff --git a/client/app/login/login.component.ts b/client/src/app/login/login.component.ts
index 50f598d92..9d88536ca 100644
--- a/client/app/login/login.component.ts
+++ b/client/src/app/login/login.component.ts
@@ -1,11 +1,11 @@
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, AuthStatus, User } from '../shared/index'; 4import { AuthService, AuthStatus, User } from '../shared';
5 5
6@Component({ 6@Component({
7 selector: 'my-login', 7 selector: 'my-login',
8 templateUrl: 'client/app/login/login.component.html' 8 template: require('./login.component.html')
9}) 9})
10 10
11export class LoginComponent { 11export class LoginComponent {
diff --git a/client/src/app/shared/index.ts b/client/src/app/shared/index.ts
new file mode 100644
index 000000000..0cab7dad0
--- /dev/null
+++ b/client/src/app/shared/index.ts
@@ -0,0 +1,2 @@
1export * from './search';
2export * from './users'
diff --git a/client/app/shared/search/index.ts b/client/src/app/shared/search/index.ts
index a49a4f1a9..a49a4f1a9 100644
--- a/client/app/shared/search/index.ts
+++ b/client/src/app/shared/search/index.ts
diff --git a/client/app/shared/search/search-field.type.ts b/client/src/app/shared/search/search-field.type.ts
index 846236290..846236290 100644
--- a/client/app/shared/search/search-field.type.ts
+++ b/client/src/app/shared/search/search-field.type.ts
diff --git a/client/app/shared/search/search.component.html b/client/src/app/shared/search/search.component.html
index fb13ac72e..fb13ac72e 100644
--- a/client/app/shared/search/search.component.html
+++ b/client/src/app/shared/search/search.component.html
diff --git a/client/app/shared/search/search.component.ts b/client/src/app/shared/search/search.component.ts
index d541cd0d6..31f8b1535 100644
--- a/client/app/shared/search/search.component.ts
+++ b/client/src/app/shared/search/search.component.ts
@@ -7,7 +7,7 @@ import { SearchField } from './search-field.type';
7 7
8@Component({ 8@Component({
9 selector: 'my-search', 9 selector: 'my-search',
10 templateUrl: 'client/app/shared/search/search.component.html', 10 template: require('./search.component.html'),
11 directives: [ DROPDOWN_DIRECTIVES ] 11 directives: [ DROPDOWN_DIRECTIVES ]
12}) 12})
13 13
diff --git a/client/app/shared/search/search.model.ts b/client/src/app/shared/search/search.model.ts
index 932a6566c..932a6566c 100644
--- a/client/app/shared/search/search.model.ts
+++ b/client/src/app/shared/search/search.model.ts
diff --git a/client/app/shared/users/auth-status.model.ts b/client/src/app/shared/users/auth-status.model.ts
index f646bd4cf..f646bd4cf 100644
--- a/client/app/shared/users/auth-status.model.ts
+++ b/client/src/app/shared/users/auth-status.model.ts
diff --git a/client/app/shared/users/auth.service.ts b/client/src/app/shared/users/auth.service.ts
index d63fe38f3..d63fe38f3 100644
--- a/client/app/shared/users/auth.service.ts
+++ b/client/src/app/shared/users/auth.service.ts
diff --git a/client/app/shared/users/index.ts b/client/src/app/shared/users/index.ts
index c6816b3c6..c6816b3c6 100644
--- a/client/app/shared/users/index.ts
+++ b/client/src/app/shared/users/index.ts
diff --git a/client/app/shared/users/token.model.ts b/client/src/app/shared/users/token.model.ts
index 021c83fad..021c83fad 100644
--- a/client/app/shared/users/token.model.ts
+++ b/client/src/app/shared/users/token.model.ts
diff --git a/client/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index ca0a5f26c..ca0a5f26c 100644
--- a/client/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
diff --git a/client/src/app/videos/index.ts b/client/src/app/videos/index.ts
new file mode 100644
index 000000000..9a92fa57a
--- /dev/null
+++ b/client/src/app/videos/index.ts
@@ -0,0 +1,4 @@
1export * from './shared';
2export * from './video-add';
3export * from './video-list';
4export * from './video-watch';
diff --git a/client/app/videos/shared/index.ts b/client/src/app/videos/shared/index.ts
index c535c46fc..a54120f5d 100644
--- a/client/app/videos/shared/index.ts
+++ b/client/src/app/videos/shared/index.ts
@@ -1,4 +1,4 @@
1export * from './loader/index'; 1export * from './loader';
2export * from './pagination.model'; 2export * from './pagination.model';
3export * from './sort-field.type'; 3export * from './sort-field.type';
4export * from './video.model'; 4export * from './video.model';
diff --git a/client/app/videos/shared/loader/index.ts b/client/src/app/videos/shared/loader/index.ts
index ab22584e4..ab22584e4 100644
--- a/client/app/videos/shared/loader/index.ts
+++ b/client/src/app/videos/shared/loader/index.ts
diff --git a/client/app/videos/shared/loader/loader.component.html b/client/src/app/videos/shared/loader/loader.component.html
index d02296a2d..d02296a2d 100644
--- a/client/app/videos/shared/loader/loader.component.html
+++ b/client/src/app/videos/shared/loader/loader.component.html
diff --git a/client/app/videos/shared/loader/loader.component.scss b/client/src/app/videos/shared/loader/loader.component.scss
index 454195811..454195811 100644
--- a/client/app/videos/shared/loader/loader.component.scss
+++ b/client/src/app/videos/shared/loader/loader.component.scss
diff --git a/client/app/videos/shared/loader/loader.component.ts b/client/src/app/videos/shared/loader/loader.component.ts
index 666d43bc3..cdd07d1b4 100644
--- a/client/app/videos/shared/loader/loader.component.ts
+++ b/client/src/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: [ 'client/app/videos/shared/loader/loader.component.css' ], 5 styles: [ require('./loader.component.scss') ],
6 templateUrl: 'client/app/videos/shared/loader/loader.component.html' 6 template: require('./loader.component.html')
7}) 7})
8 8
9export class LoaderComponent { 9export class LoaderComponent {
diff --git a/client/app/videos/shared/pagination.model.ts b/client/src/app/videos/shared/pagination.model.ts
index 06f7a7875..06f7a7875 100644
--- a/client/app/videos/shared/pagination.model.ts
+++ b/client/src/app/videos/shared/pagination.model.ts
diff --git a/client/app/videos/shared/sort-field.type.ts b/client/src/app/videos/shared/sort-field.type.ts
index 6e8cc7936..6e8cc7936 100644
--- a/client/app/videos/shared/sort-field.type.ts
+++ b/client/src/app/videos/shared/sort-field.type.ts
diff --git a/client/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 614403d79..614403d79 100644
--- a/client/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
diff --git a/client/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts
index a786b2ab2..76d46cbb4 100644
--- a/client/app/videos/shared/video.service.ts
+++ b/client/src/app/videos/shared/video.service.ts
@@ -3,9 +3,9 @@ import { Http, Response, URLSearchParams } from '@angular/http';
3import { Observable } from 'rxjs/Rx'; 3import { Observable } from 'rxjs/Rx';
4 4
5import { Pagination } from './pagination.model'; 5import { Pagination } from './pagination.model';
6import { Search } from '../../shared/index'; 6import { Search } from '../../shared';
7import { SortField } from './sort-field.type'; 7import { SortField } from './sort-field.type';
8import { AuthService } from '../../shared/index'; 8import { AuthService } from '../../shared';
9import { Video } from './video.model'; 9import { Video } from './video.model';
10 10
11@Injectable() 11@Injectable()
diff --git a/client/app/videos/video-add/index.ts b/client/src/app/videos/video-add/index.ts
index 79488e851..79488e851 100644
--- a/client/app/videos/video-add/index.ts
+++ b/client/src/app/videos/video-add/index.ts
diff --git a/client/app/videos/video-add/video-add.component.html b/client/src/app/videos/video-add/video-add.component.html
index 80d229cb8..80d229cb8 100644
--- a/client/app/videos/video-add/video-add.component.html
+++ b/client/src/app/videos/video-add/video-add.component.html
diff --git a/client/app/videos/video-add/video-add.component.scss b/client/src/app/videos/video-add/video-add.component.scss
index 01195f017..01195f017 100644
--- a/client/app/videos/video-add/video-add.component.scss
+++ b/client/src/app/videos/video-add/video-add.component.scss
diff --git a/client/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts
index e17b1b0f6..8df4f951b 100644
--- a/client/app/videos/video-add/video-add.component.ts
+++ b/client/src/app/videos/video-add/video-add.component.ts
@@ -1,5 +1,5 @@
1/// <reference path="../../../typings/globals/jquery/index.d.ts" /> 1/// <reference path="../../../../typings/globals/jquery/index.d.ts" />
2/// <reference path="../../../typings/globals/jquery.fileupload/index.d.ts" /> 2/// <reference path="../../../../typings/globals/jquery.fileupload/index.d.ts" />
3 3
4import { Component, ElementRef, OnInit } from '@angular/core'; 4import { Component, ElementRef, OnInit } from '@angular/core';
5import { Router } from '@angular/router-deprecated'; 5import { Router } from '@angular/router-deprecated';
@@ -7,12 +7,12 @@ import { Router } from '@angular/router-deprecated';
7import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 7import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
8import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar'; 8import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar';
9 9
10import { AuthService, User } from '../../shared/index'; 10import { AuthService, User } from '../../shared';
11 11
12@Component({ 12@Component({
13 selector: 'my-videos-add', 13 selector: 'my-videos-add',
14 styleUrls: [ 'client/app/videos/video-add/video-add.component.css' ], 14 styles: [ require('./video-add.component.scss') ],
15 templateUrl: 'client/app/videos/video-add/video-add.component.html', 15 template: require('./video-add.component.html'),
16 directives: [ PROGRESSBAR_DIRECTIVES ], 16 directives: [ PROGRESSBAR_DIRECTIVES ],
17 pipes: [ BytesPipe ] 17 pipes: [ BytesPipe ]
18}) 18})
diff --git a/client/app/videos/video-list/index.ts b/client/src/app/videos/video-list/index.ts
index 1f6d6a4e7..1f6d6a4e7 100644
--- a/client/app/videos/video-list/index.ts
+++ b/client/src/app/videos/video-list/index.ts
diff --git a/client/app/videos/video-list/video-list.component.html b/client/src/app/videos/video-list/video-list.component.html
index 80b1e7b1b..80b1e7b1b 100644
--- a/client/app/videos/video-list/video-list.component.html
+++ b/client/src/app/videos/video-list/video-list.component.html
diff --git a/client/app/videos/video-list/video-list.component.scss b/client/src/app/videos/video-list/video-list.component.scss
index 9441d80c3..9441d80c3 100644
--- a/client/app/videos/video-list/video-list.component.scss
+++ b/client/src/app/videos/video-list/video-list.component.scss
diff --git a/client/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts
index baca00deb..b1ce55845 100644
--- a/client/app/videos/video-list/video-list.component.ts
+++ b/client/src/app/videos/video-list/video-list.component.ts
@@ -9,15 +9,15 @@ import {
9 SortField, 9 SortField,
10 Video, 10 Video,
11 VideoService 11 VideoService
12} from '../shared/index'; 12} from '../shared';
13import { AuthService, Search, SearchField, User } from '../../shared/index'; 13import { AuthService, Search, SearchField, User } from '../../shared';
14import { VideoMiniatureComponent } from './video-miniature.component'; 14import { VideoMiniatureComponent } from './video-miniature.component';
15import { VideoSortComponent } from './video-sort.component'; 15import { VideoSortComponent } from './video-sort.component';
16 16
17@Component({ 17@Component({
18 selector: 'my-videos-list', 18 selector: 'my-videos-list',
19 styleUrls: [ 'client/app/videos/video-list/video-list.component.css' ], 19 styles: [ require('./video-list.component.scss') ],
20 templateUrl: 'client/app/videos/video-list/video-list.component.html', 20 template: require('./video-list.component.html'),
21 directives: [ LoaderComponent, PAGINATION_DIRECTIVES, ROUTER_DIRECTIVES, VideoMiniatureComponent, VideoSortComponent ] 21 directives: [ LoaderComponent, PAGINATION_DIRECTIVES, ROUTER_DIRECTIVES, VideoMiniatureComponent, VideoSortComponent ]
22}) 22})
23 23
diff --git a/client/app/videos/video-list/video-miniature.component.html b/client/src/app/videos/video-list/video-miniature.component.html
index 244254b5a..244254b5a 100644
--- a/client/app/videos/video-list/video-miniature.component.html
+++ b/client/src/app/videos/video-list/video-miniature.component.html
diff --git a/client/app/videos/video-list/video-miniature.component.scss b/client/src/app/videos/video-list/video-miniature.component.scss
index 4488abe22..4488abe22 100644
--- a/client/app/videos/video-list/video-miniature.component.scss
+++ b/client/src/app/videos/video-list/video-miniature.component.scss
diff --git a/client/app/videos/video-list/video-miniature.component.ts b/client/src/app/videos/video-list/video-miniature.component.ts
index 11b828ca6..639339b44 100644
--- a/client/app/videos/video-list/video-miniature.component.ts
+++ b/client/src/app/videos/video-list/video-miniature.component.ts
@@ -2,13 +2,13 @@ import { DatePipe } from '@angular/common';
2import { Component, Input, Output, EventEmitter } from '@angular/core'; 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, VideoService } from '../shared/index'; 5import { Video, VideoService } from '../shared';
6import { User } from '../../shared/index'; 6import { User } from '../../shared';
7 7
8@Component({ 8@Component({
9 selector: 'my-video-miniature', 9 selector: 'my-video-miniature',
10 styleUrls: [ 'client/app/videos/video-list/video-miniature.component.css' ], 10 styles: [ require('./video-miniature.component.scss') ],
11 templateUrl: 'client/app/videos/video-list/video-miniature.component.html', 11 template: require('./video-miniature.component.html'),
12 directives: [ ROUTER_DIRECTIVES ], 12 directives: [ ROUTER_DIRECTIVES ],
13 pipes: [ DatePipe ] 13 pipes: [ DatePipe ]
14}) 14})
diff --git a/client/app/videos/video-list/video-sort.component.html b/client/src/app/videos/video-list/video-sort.component.html
index 3bece0b22..3bece0b22 100644
--- a/client/app/videos/video-list/video-sort.component.html
+++ b/client/src/app/videos/video-list/video-sort.component.html
diff --git a/client/app/videos/video-list/video-sort.component.ts b/client/src/app/videos/video-list/video-sort.component.ts
index 2cb810ff5..0d76b54b7 100644
--- a/client/app/videos/video-list/video-sort.component.ts
+++ b/client/src/app/videos/video-list/video-sort.component.ts
@@ -1,10 +1,10 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core'; 1import { Component, EventEmitter, Input, Output } from '@angular/core';
2 2
3import { SortField } from '../shared/index'; 3import { SortField } from '../shared';
4 4
5@Component({ 5@Component({
6 selector: 'my-video-sort', 6 selector: 'my-video-sort',
7 templateUrl: 'client/app/videos/video-list/video-sort.component.html' 7 template: require('./video-sort.component.html')
8}) 8})
9 9
10export class VideoSortComponent { 10export class VideoSortComponent {
diff --git a/client/app/videos/video-watch/index.ts b/client/src/app/videos/video-watch/index.ts
index b17aaacf2..b17aaacf2 100644
--- a/client/app/videos/video-watch/index.ts
+++ b/client/src/app/videos/video-watch/index.ts
diff --git a/client/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html
index 6c36b27e2..6c36b27e2 100644
--- a/client/app/videos/video-watch/video-watch.component.html
+++ b/client/src/app/videos/video-watch/video-watch.component.html
diff --git a/client/app/videos/video-watch/video-watch.component.scss b/client/src/app/videos/video-watch/video-watch.component.scss
index 1228d42f4..1228d42f4 100644
--- a/client/app/videos/video-watch/video-watch.component.scss
+++ b/client/src/app/videos/video-watch/video-watch.component.scss
diff --git a/client/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index 71fb4f634..db82283b4 100644
--- a/client/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -3,13 +3,13 @@ import { CanDeactivate, ComponentInstruction, RouteParams } from '@angular/route
3 3
4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
5 5
6import { LoaderComponent, Video, VideoService } from '../shared/index'; 6import { LoaderComponent, Video, VideoService } from '../shared';
7import { WebTorrentService } from './webtorrent.service'; 7import { WebTorrentService } from './webtorrent.service';
8 8
9@Component({ 9@Component({
10 selector: 'my-video-watch', 10 selector: 'my-video-watch',
11 templateUrl: 'client/app/videos/video-watch/video-watch.component.html', 11 template: require('./video-watch.component.html'),
12 styleUrls: [ 'client/app/videos/video-watch/video-watch.component.css' ], 12 styles: [ require('./video-watch.component.scss') ],
13 providers: [ WebTorrentService ], 13 providers: [ WebTorrentService ],
14 directives: [ LoaderComponent ], 14 directives: [ LoaderComponent ],
15 pipes: [ BytesPipe ] 15 pipes: [ BytesPipe ]
diff --git a/client/app/videos/video-watch/webtorrent.service.ts b/client/src/app/videos/video-watch/webtorrent.service.ts
index 0c73ab4f4..bf38b5aaa 100644
--- a/client/app/videos/video-watch/webtorrent.service.ts
+++ b/client/src/app/videos/video-watch/webtorrent.service.ts
@@ -1,6 +1,6 @@
1// Don't use webtorrent typings for now 1// Don't use webtorrent typings for now
2// It misses some little things I'll fix later 2// It misses some little things I'll fix later
3// <reference path="../../../typings/globals/webtorrent/index.d.ts" /> 3// <reference path="../../../../typings/globals/webtorrent/index.d.ts" />
4 4
5import { Injectable } from '@angular/core'; 5import { Injectable } from '@angular/core';
6 6
diff --git a/client/images/favicon.png b/client/src/assets/favicon.png
index bb57ee6b0..bb57ee6b0 100644
--- a/client/images/favicon.png
+++ b/client/src/assets/favicon.png
Binary files differ
diff --git a/client/src/custom-typings.d.ts b/client/src/custom-typings.d.ts
new file mode 100644
index 000000000..14c7d8ade
--- /dev/null
+++ b/client/src/custom-typings.d.ts
@@ -0,0 +1,119 @@
1/*
2 * Custom Type Definitions
3 * When including 3rd party modules you also need to include the type definition for the module
4 * if they don't provide one within the module. You can try to install it with typings
5
6typings install node --save
7
8 * If you can't find the type definition in the registry we can make an ambient definition in
9 * this file for now. For example
10
11declare module "my-module" {
12 export function doesSomething(value: string): string;
13}
14
15 *
16 * If you're prototying and you will fix the types later you can also declare it as type any
17 *
18
19declare var assert: any;
20
21 *
22 * If you're importing a module that uses Node.js modules which are CommonJS you need to import as
23 *
24
25import * as _ from 'lodash'
26
27 * You can include your type definitions in this file until you create one for the typings registry
28 * see https://github.com/typings/registry
29 *
30 */
31
32
33// Extra variables that live on Global that will be replaced by webpack DefinePlugin
34declare var ENV: string;
35declare var HMR: boolean;
36interface GlobalEnvironment {
37 ENV;
38 HMR;
39}
40
41interface WebpackModule {
42 hot: {
43 data?: any,
44 idle: any,
45 accept(dependencies?: string | string[], callback?: (updatedDependencies?: any) => void): void;
46 decline(dependencies?: string | string[]): void;
47 dispose(callback?: (data?: any) => void): void;
48 addDisposeHandler(callback?: (data?: any) => void): void;
49 removeDisposeHandler(callback?: (data?: any) => void): void;
50 check(autoApply?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void;
51 apply(options?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void;
52 status(callback?: (status?: string) => void): void | string;
53 removeStatusHandler(callback?: (status?: string) => void): void;
54 };
55}
56
57interface WebpackRequire {
58 context(file: string, flag?: boolean, exp?: RegExp): any;
59}
60
61
62interface ErrorStackTraceLimit {
63 stackTraceLimit: number;
64}
65
66
67
68// Extend typings
69interface NodeRequire extends WebpackRequire {}
70interface ErrorConstructor extends ErrorStackTraceLimit {}
71interface NodeModule extends WebpackModule {}
72interface Global extends GlobalEnvironment {}
73
74
75declare namespace Reflect {
76 function decorate(decorators: ClassDecorator[], target: Function): Function;
77 function decorate(
78 decorators: (PropertyDecorator | MethodDecorator)[],
79 target: Object,
80 targetKey: string | symbol,
81 descriptor?: PropertyDescriptor): PropertyDescriptor;
82
83 function metadata(metadataKey: any, metadataValue: any): {
84 (target: Function): void;
85 (target: Object, propertyKey: string | symbol): void;
86 };
87 function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
88 function defineMetadata(
89 metadataKey: any,
90 metadataValue: any,
91 target: Object,
92 targetKey: string | symbol): void;
93 function hasMetadata(metadataKey: any, target: Object): boolean;
94 function hasMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean;
95 function hasOwnMetadata(metadataKey: any, target: Object): boolean;
96 function hasOwnMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean;
97 function getMetadata(metadataKey: any, target: Object): any;
98 function getMetadata(metadataKey: any, target: Object, targetKey: string | symbol): any;
99 function getOwnMetadata(metadataKey: any, target: Object): any;
100 function getOwnMetadata(metadataKey: any, target: Object, targetKey: string | symbol): any;
101 function getMetadataKeys(target: Object): any[];
102 function getMetadataKeys(target: Object, targetKey: string | symbol): any[];
103 function getOwnMetadataKeys(target: Object): any[];
104 function getOwnMetadataKeys(target: Object, targetKey: string | symbol): any[];
105 function deleteMetadata(metadataKey: any, target: Object): boolean;
106 function deleteMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean;
107}
108
109
110// We need this here since there is a problem with Zone.js typings
111interface Thenable<T> {
112 then<U>(
113 onFulfilled?: (value: T) => U | Thenable<U>,
114 onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
115 then<U>(
116 onFulfilled?: (value: T) => U | Thenable<U>,
117 onRejected?: (error: any) => void): Thenable<U>;
118 catch<U>(onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
119}
diff --git a/client/src/index.html b/client/src/index.html
new file mode 100644
index 000000000..83f4cc8f0
--- /dev/null
+++ b/client/src/index.html
@@ -0,0 +1,17 @@
1<html>
2 <head>
3 <base href="/">
4
5 <title>PeerTube</title>
6
7 <meta charset="UTF-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1">
9
10 <link rel="icon" href="/client/assets/favicon.ico" />
11 </head>
12
13 <!-- 3. Display the application -->
14 <body>
15 <my-app>Loading...</my-app>
16 </body>
17</html>
diff --git a/client/main.ts b/client/src/main.ts
index 5e2ea0de0..76b3f498a 100644
--- a/client/main.ts
+++ b/client/src/main.ts
@@ -1,5 +1,10 @@
1import { enableProdMode } from '@angular/core';
1import { bootstrap } from '@angular/platform-browser-dynamic'; 2import { bootstrap } from '@angular/platform-browser-dynamic';
2 3
3import { AppComponent } from './app/app.component'; 4import { AppComponent } from './app/app.component';
4 5
6if (process.env.ENV === 'production') {
7 enableProdMode();
8}
9
5bootstrap(AppComponent); 10bootstrap(AppComponent);
diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts
new file mode 100644
index 000000000..3395eed76
--- /dev/null
+++ b/client/src/polyfills.ts
@@ -0,0 +1,28 @@
1// Polyfills
2// (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
3
4// import 'ie-shim'; // Internet Explorer
5// import 'es6-shim';
6// import 'es6-promise';
7// import 'es7-reflect-metadata';
8
9// Prefer CoreJS over the polyfills above
10import 'core-js/es6';
11import 'core-js/es7/reflect';
12require('zone.js/dist/zone');
13
14// Typescript emit helpers polyfill
15import 'ts-helpers';
16
17if ('production' === ENV) {
18 // Production
19
20
21} else {
22 // Development
23
24 Error.stackTraceLimit = Infinity;
25
26 require('zone.js/dist/long-stack-trace-zone');
27
28}
diff --git a/client/stylesheets/base.scss b/client/src/sass/application.scss
index 5c56e9507..5c56e9507 100644
--- a/client/stylesheets/base.scss
+++ b/client/src/sass/application.scss
diff --git a/client/src/sass/pre-customizations.scss b/client/src/sass/pre-customizations.scss
new file mode 100644
index 000000000..e92004128
--- /dev/null
+++ b/client/src/sass/pre-customizations.scss
@@ -0,0 +1 @@
// $icon-font-path: "/assets/fonts/";
diff --git a/client/src/vendor.ts b/client/src/vendor.ts
new file mode 100644
index 000000000..0f82c59a4
--- /dev/null
+++ b/client/src/vendor.ts
@@ -0,0 +1,28 @@
1// For vendors for example jQuery, Lodash, angular2-jwt just import them here unless you plan on
2// chunking vendors files for async loading. You would need to import the async loaded vendors
3// at the entry point of the async loaded file. Also see custom-typings.d.ts as you also need to
4// run `typings install x` where `x` is your module
5
6// Angular 2
7import '@angular/platform-browser';
8import '@angular/platform-browser-dynamic';
9import '@angular/core';
10import '@angular/common';
11import '@angular/http';
12import '@angular/router-deprecated';
13
14// RxJS
15import 'rxjs/add/operator/map';
16import 'rxjs/add/operator/mergeMap';
17
18import 'jquery';
19import 'bootstrap-loader';
20
21if ('production' === ENV) {
22 // Production
23
24
25} else {
26 // Development
27
28}
diff --git a/client/stylesheets/application.scss b/client/stylesheets/application.scss
deleted file mode 100644
index 98c1e37ad..000000000
--- a/client/stylesheets/application.scss
+++ /dev/null
@@ -1,5 +0,0 @@
1$icon-font-path: "/client/node_modules/bootstrap-sass/assets/fonts/bootstrap/";
2
3@import "bootstrap-variables";
4@import "_bootstrap";
5@import "base.scss";
diff --git a/client/stylesheets/bootstrap-variables.scss b/client/stylesheets/bootstrap-variables.scss
deleted file mode 100644
index a2472f357..000000000
--- a/client/stylesheets/bootstrap-variables.scss
+++ /dev/null
@@ -1,875 +0,0 @@
1// Override Bootstrap variables here (defaults from bootstrap-sass v3.3.6):
2
3//
4// Variables
5// --------------------------------------------------
6
7
8//== Colors
9//
10//## Gray and brand colors for use across Bootstrap.
11
12// $gray-base: #000
13// $gray-darker: lighten($gray-base, 13.5%) // #222
14// $gray-dark: lighten($gray-base, 20%) // #333
15// $gray: lighten($gray-base, 33.5%) // #555
16// $gray-light: lighten($gray-base, 46.7%) // #777
17// $gray-lighter: lighten($gray-base, 93.5%) // #eee
18
19// $brand-primary: darken(#428bca, 6.5%) // #337ab7
20// $brand-success: #5cb85c
21// $brand-info: #5bc0de
22// $brand-warning: #f0ad4e
23// $brand-danger: #d9534f
24
25
26//== Scaffolding
27//
28//## Settings for some of the most global styles.
29
30//** Background color for `<body>`.
31// $body-bg: #fff
32//** Global text color on `<body>`.
33// $text-color: $gray-dark
34
35//** Global textual link color.
36// $link-color: $brand-primary
37//** Link hover color set via `darken()` function.
38// $link-hover-color: darken($link-color, 15%)
39//** Link hover decoration.
40// $link-hover-decoration: underline
41
42
43//== Typography
44//
45//## Font, line-height, and color for body text, headings, and more.
46
47// $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif
48// $font-family-serif: Georgia, "Times New Roman", Times, serif
49//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
50// $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace
51// $font-family-base: $font-family-sans-serif
52
53// $font-size-base: 14px
54// $font-size-large: ceil(($font-size-base * 1.25)) // ~18px
55// $font-size-small: ceil(($font-size-base * 0.85)) // ~12px
56
57// $font-size-h1: floor(($font-size-base * 2.6)) // ~36px
58// $font-size-h2: floor(($font-size-base * 2.15)) // ~30px
59// $font-size-h3: ceil(($font-size-base * 1.7)) // ~24px
60// $font-size-h4: ceil(($font-size-base * 1.25)) // ~18px
61// $font-size-h5: $font-size-base
62// $font-size-h6: ceil(($font-size-base * 0.85)) // ~12px
63
64//** Unit-less `line-height` for use in components like buttons.
65// $line-height-base: 1.428571429 // 20/14
66//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
67// $line-height-computed: floor(($font-size-base * $line-height-base)) // ~20px
68
69//** By default, this inherits from the `<body>`.
70// $headings-font-family: inherit
71// $headings-font-weight: 500
72// $headings-line-height: 1.1
73// $headings-color: inherit
74
75
76//== Iconography
77//
78//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
79
80//** Load fonts from this directory.
81
82// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
83// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
84// $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/")
85
86//** File name for all font files.
87// $icon-font-name: "glyphicons-halflings-regular"
88//** Element ID within SVG icon file.
89// $icon-font-svg-id: "glyphicons_halflingsregular"
90
91
92//== Components
93//
94//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
95
96// $padding-base-vertical: 6px
97// $padding-base-horizontal: 12px
98
99// $padding-large-vertical: 10px
100// $padding-large-horizontal: 16px
101
102// $padding-small-vertical: 5px
103// $padding-small-horizontal: 10px
104
105// $padding-xs-vertical: 1px
106// $padding-xs-horizontal: 5px
107
108// $line-height-large: 1.3333333 // extra decimals for Win 8.1 Chrome
109// $line-height-small: 1.5
110
111// $border-radius-base: 0;
112// $border-radius-large: 0;
113// $border-radius-small: 0;
114
115//** Global color for active items (e.g., navs or dropdowns).
116// $component-active-color: #fff
117//** Global background color for active items (e.g., navs or dropdowns).
118// $component-active-bg: $brand-primary
119
120//** Width of the `border` for generating carets that indicator dropdowns.
121// $caret-width-base: 4px
122//** Carets increase slightly in size for larger components.
123// $caret-width-large: 5px
124
125
126//== Tables
127//
128//## Customizes the `.table` component with basic values, each used across all table variations.
129
130//** Padding for `<th>`s and `<td>`s.
131// $table-cell-padding: 8px
132//** Padding for cells in `.table-condensed`.
133// $table-condensed-cell-padding: 5px
134
135//** Default background color used for all tables.
136// $table-bg: transparent
137//** Background color used for `.table-striped`.
138// $table-bg-accent: #f9f9f9
139//** Background color used for `.table-hover`.
140// $table-bg-hover: #f5f5f5
141// $table-bg-active: $table-bg-hover
142
143//** Border color for table and cell borders.
144// $table-border-color: #ddd
145
146
147//== Buttons
148//
149//## For each of Bootstrap's buttons, define text, background and border color.
150
151// $btn-font-weight: normal
152
153// $btn-default-color: #333
154// $btn-default-bg: #fff
155// $btn-default-border: #ccc
156
157// $btn-primary-color: #fff
158// $btn-primary-bg: $brand-primary
159// $btn-primary-border: darken($btn-primary-bg, 5%)
160
161// $btn-success-color: #fff
162// $btn-success-bg: $brand-success
163// $btn-success-border: darken($btn-success-bg, 5%)
164
165// $btn-info-color: #fff
166// $btn-info-bg: $brand-info
167// $btn-info-border: darken($btn-info-bg, 5%)
168
169// $btn-warning-color: #fff
170// $btn-warning-bg: $brand-warning
171// $btn-warning-border: darken($btn-warning-bg, 5%)
172
173// $btn-danger-color: #fff
174// $btn-danger-bg: $brand-danger
175// $btn-danger-border: darken($btn-danger-bg, 5%)
176
177// $btn-link-disabled-color: $gray-light
178
179// Allows for customizing button radius independently from global border radius
180// $btn-border-radius-base: $border-radius-base
181// $btn-border-radius-large: $border-radius-large
182// $btn-border-radius-small: $border-radius-small
183
184
185//== Forms
186//
187//##
188
189//** `<input>` background color
190// $input-bg: #fff
191//** `<input disabled>` background color
192// $input-bg-disabled: $gray-lighter
193
194//** Text color for `<input>`s
195// $input-color: $gray
196//** `<input>` border color
197// $input-border: #ccc
198
199// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
200//** Default `.form-control` border radius
201// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
202// $input-border-radius: $border-radius-base
203//** Large `.form-control` border radius
204// $input-border-radius-large: $border-radius-large
205//** Small `.form-control` border radius
206// $input-border-radius-small: $border-radius-small
207
208//** Border color for inputs on focus
209// $input-border-focus: #66afe9
210
211//** Placeholder text color
212// $input-color-placeholder: #999
213
214//** Default `.form-control` height
215// $input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2)
216//** Large `.form-control` height
217// $input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2)
218//** Small `.form-control` height
219// $input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2)
220
221//** `.form-group` margin
222// $form-group-margin-bottom: 15px
223
224// $legend-color: $gray-dark
225// $legend-border-color: #e5e5e5
226
227//** Background color for textual input addons
228// $input-group-addon-bg: $gray-lighter
229//** Border color for textual input addons
230// $input-group-addon-border-color: $input-border
231
232//** Disabled cursor for form controls and buttons.
233// $cursor-disabled: not-allowed
234
235
236//== Dropdowns
237//
238//## Dropdown menu container and contents.
239
240//** Background for the dropdown menu.
241// $dropdown-bg: #fff
242//** Dropdown menu `border-color`.
243// $dropdown-border: rgba(0,0,0,.15)
244//** Dropdown menu `border-color` **for IE8**.
245// $dropdown-fallback-border: #ccc
246//** Divider color for between dropdown items.
247// $dropdown-divider-bg: #e5e5e5
248
249//** Dropdown link text color.
250// $dropdown-link-color: $gray-dark
251//** Hover color for dropdown links.
252// $dropdown-link-hover-color: darken($gray-dark, 5%)
253//** Hover background for dropdown links.
254// $dropdown-link-hover-bg: #f5f5f5
255
256//** Active dropdown menu item text color.
257// $dropdown-link-active-color: $component-active-color
258//** Active dropdown menu item background color.
259// $dropdown-link-active-bg: $component-active-bg
260
261//** Disabled dropdown menu item background color.
262// $dropdown-link-disabled-color: $gray-light
263
264//** Text color for headers within dropdown menus.
265// $dropdown-header-color: $gray-light
266
267//** Deprecated `$dropdown-caret-color` as of v3.1.0
268// $dropdown-caret-color: #000
269
270
271//-- Z-index master list
272//
273// Warning: Avoid customizing these values. They're used for a bird's eye view
274// of components dependent on the z-axis and are designed to all work together.
275//
276// Note: These variables are not generated into the Customizer.
277
278// $zindex-navbar: 1000
279// $zindex-dropdown: 1000
280// $zindex-popover: 1060
281// $zindex-tooltip: 1070
282// $zindex-navbar-fixed: 1030
283// $zindex-modal-background: 1040
284// $zindex-modal: 1050
285
286
287//== Media queries breakpoints
288//
289//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
290
291// Extra small screen / phone
292//** Deprecated `$screen-xs` as of v3.0.1
293// $screen-xs: 480px
294//** Deprecated `$screen-xs-min` as of v3.2.0
295// $screen-xs-min: $screen-xs
296//** Deprecated `$screen-phone` as of v3.0.1
297// $screen-phone: $screen-xs-min
298
299// Small screen / tablet
300//** Deprecated `$screen-sm` as of v3.0.1
301// $screen-sm: 768px
302// $screen-sm-min: $screen-sm
303//** Deprecated `$screen-tablet` as of v3.0.1
304// $screen-tablet: $screen-sm-min
305
306// Medium screen / desktop
307//** Deprecated `$screen-md` as of v3.0.1
308// $screen-md: 992px
309// $screen-md-min: $screen-md
310//** Deprecated `$screen-desktop` as of v3.0.1
311// $screen-desktop: $screen-md-min
312
313// Large screen / wide desktop
314//** Deprecated `$screen-lg` as of v3.0.1
315// $screen-lg: 1200px
316// $screen-lg-min: $screen-lg
317//** Deprecated `$screen-lg-desktop` as of v3.0.1
318// $screen-lg-desktop: $screen-lg-min
319
320// So media queries don't overlap when required, provide a maximum
321// $screen-xs-max: ($screen-sm-min - 1)
322// $screen-sm-max: ($screen-md-min - 1)
323// $screen-md-max: ($screen-lg-min - 1)
324
325
326//== Grid system
327//
328//## Define your custom responsive grid.
329
330//** Number of columns in the grid.
331// $grid-columns: 12
332//** Padding between columns. Gets divided in half for the left and right.
333// $grid-gutter-width: 30px
334// Navbar collapse
335//** Point at which the navbar becomes uncollapsed.
336// $grid-float-breakpoint: $screen-sm-min
337//** Point at which the navbar begins collapsing.
338// $grid-float-breakpoint-max: ($grid-float-breakpoint - 1)
339
340
341//== Container sizes
342//
343//## Define the maximum width of `.container` for different screen sizes.
344
345// Small screen / tablet
346// $container-tablet: (720px + $grid-gutter-width)
347//** For `$screen-sm-min` and up.
348// $container-sm: $container-tablet
349
350// Medium screen / desktop
351// $container-desktop: (940px + $grid-gutter-width)
352//** For `$screen-md-min` and up.
353// $container-md: $container-desktop
354
355// Large screen / wide desktop
356// $container-large-desktop: (1140px + $grid-gutter-width)
357//** For `$screen-lg-min` and up.
358// $container-lg: $container-large-desktop
359
360
361//== Navbar
362//
363//##
364
365// Basics of a navbar
366// $navbar-height: 50px
367// $navbar-margin-bottom: $line-height-computed
368// $navbar-border-radius: $border-radius-base
369// $navbar-padding-horizontal: floor(($grid-gutter-width / 2))
370// $navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2)
371// $navbar-collapse-max-height: 340px
372
373// $navbar-default-color: #777
374// $navbar-default-bg: #f8f8f8
375// $navbar-default-border: darken($navbar-default-bg, 6.5%)
376
377// Navbar links
378// $navbar-default-link-color: #777
379// $navbar-default-link-hover-color: #333
380// $navbar-default-link-hover-bg: transparent
381// $navbar-default-link-active-color: #555
382// $navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%)
383// $navbar-default-link-disabled-color: #ccc
384// $navbar-default-link-disabled-bg: transparent
385
386// Navbar brand label
387// $navbar-default-brand-color: $navbar-default-link-color
388// $navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%)
389// $navbar-default-brand-hover-bg: transparent
390
391// Navbar toggle
392// $navbar-default-toggle-hover-bg: #ddd
393// $navbar-default-toggle-icon-bar-bg: #888
394// $navbar-default-toggle-border-color: #ddd
395
396
397//=== Inverted navbar
398// Reset inverted navbar basics
399// $navbar-inverse-color: lighten($gray-light, 15%)
400// $navbar-inverse-bg: #222
401// $navbar-inverse-border: darken($navbar-inverse-bg, 10%)
402
403// Inverted navbar links
404// $navbar-inverse-link-color: lighten($gray-light, 15%)
405// $navbar-inverse-link-hover-color: #fff
406// $navbar-inverse-link-hover-bg: transparent
407// $navbar-inverse-link-active-color: $navbar-inverse-link-hover-color
408// $navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%)
409// $navbar-inverse-link-disabled-color: #444
410// $navbar-inverse-link-disabled-bg: transparent
411
412// Inverted navbar brand label
413// $navbar-inverse-brand-color: $navbar-inverse-link-color
414// $navbar-inverse-brand-hover-color: #fff
415// $navbar-inverse-brand-hover-bg: transparent
416
417// Inverted navbar toggle
418// $navbar-inverse-toggle-hover-bg: #333
419// $navbar-inverse-toggle-icon-bar-bg: #fff
420// $navbar-inverse-toggle-border-color: #333
421
422
423//== Navs
424//
425//##
426
427//=== Shared nav styles
428// $nav-link-padding: 10px 15px
429// $nav-link-hover-bg: $gray-lighter
430
431// $nav-disabled-link-color: $gray-light
432// $nav-disabled-link-hover-color: $gray-light
433
434//== Tabs
435// $nav-tabs-border-color: #ddd
436
437// $nav-tabs-link-hover-border-color: $gray-lighter
438
439// $nav-tabs-active-link-hover-bg: $body-bg
440// $nav-tabs-active-link-hover-color: $gray
441// $nav-tabs-active-link-hover-border-color: #ddd
442
443// $nav-tabs-justified-link-border-color: #ddd
444// $nav-tabs-justified-active-link-border-color: $body-bg
445
446//== Pills
447// $nav-pills-border-radius: $border-radius-base
448// $nav-pills-active-link-hover-bg: $component-active-bg
449// $nav-pills-active-link-hover-color: $component-active-color
450
451
452//== Pagination
453//
454//##
455
456// $pagination-color: $link-color
457// $pagination-bg: #fff
458// $pagination-border: #ddd
459
460// $pagination-hover-color: $link-hover-color
461// $pagination-hover-bg: $gray-lighter
462// $pagination-hover-border: #ddd
463
464// $pagination-active-color: #fff
465// $pagination-active-bg: $brand-primary
466// $pagination-active-border: $brand-primary
467
468// $pagination-disabled-color: $gray-light
469// $pagination-disabled-bg: #fff
470// $pagination-disabled-border: #ddd
471
472
473//== Pager
474//
475//##
476
477// $pager-bg: $pagination-bg
478// $pager-border: $pagination-border
479// $pager-border-radius: 15px
480
481// $pager-hover-bg: $pagination-hover-bg
482
483// $pager-active-bg: $pagination-active-bg
484// $pager-active-color: $pagination-active-color
485
486// $pager-disabled-color: $pagination-disabled-color
487
488
489//== Jumbotron
490//
491//##
492
493// $jumbotron-padding: 30px
494// $jumbotron-color: inherit
495// $jumbotron-bg: $gray-lighter
496// $jumbotron-heading-color: inherit
497// $jumbotron-font-size: ceil(($font-size-base * 1.5))
498// $jumbotron-heading-font-size: ceil(($font-size-base * 4.5))
499
500
501//== Form states and alerts
502//
503//## Define colors for form feedback states and, by default, alerts.
504
505// $state-success-text: #3c763d
506// $state-success-bg: #dff0d8
507// $state-success-border: darken(adjust-hue($state-success-bg, -10), 5%)
508
509// $state-info-text: #31708f
510// $state-info-bg: #d9edf7
511// $state-info-border: darken(adjust-hue($state-info-bg, -10), 7%)
512
513// $state-warning-text: #8a6d3b
514// $state-warning-bg: #fcf8e3
515// $state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%)
516
517// $state-danger-text: #a94442
518// $state-danger-bg: #f2dede
519// $state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%)
520
521
522//== Tooltips
523//
524//##
525
526//** Tooltip max width
527// $tooltip-max-width: 200px
528//** Tooltip text color
529// $tooltip-color: #fff
530//** Tooltip background color
531// $tooltip-bg: #000
532// $tooltip-opacity: .9
533
534//** Tooltip arrow width
535// $tooltip-arrow-width: 5px
536//** Tooltip arrow color
537// $tooltip-arrow-color: $tooltip-bg
538
539
540//== Popovers
541//
542//##
543
544//** Popover body background color
545// $popover-bg: #fff
546//** Popover maximum width
547// $popover-max-width: 276px
548//** Popover border color
549// $popover-border-color: rgba(0,0,0,.2)
550//** Popover fallback border color
551// $popover-fallback-border-color: #ccc
552
553//** Popover title background color
554// $popover-title-bg: darken($popover-bg, 3%)
555
556//** Popover arrow width
557// $popover-arrow-width: 10px
558//** Popover arrow color
559// $popover-arrow-color: $popover-bg
560
561//** Popover outer arrow width
562// $popover-arrow-outer-width: ($popover-arrow-width + 1)
563//** Popover outer arrow color
564// $popover-arrow-outer-color: fade_in($popover-border-color, 0.05)
565//** Popover outer arrow fallback color
566// $popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%)
567
568
569//== Labels
570//
571//##
572
573//** Default label background color
574// $label-default-bg: $gray-light
575//** Primary label background color
576// $label-primary-bg: $brand-primary
577//** Success label background color
578// $label-success-bg: $brand-success
579//** Info label background color
580// $label-info-bg: $brand-info
581//** Warning label background color
582// $label-warning-bg: $brand-warning
583//** Danger label background color
584// $label-danger-bg: $brand-danger
585
586//** Default label text color
587// $label-color: #fff
588//** Default text color of a linked label
589// $label-link-hover-color: #fff
590
591
592//== Modals
593//
594//##
595
596//** Padding applied to the modal body
597// $modal-inner-padding: 15px
598
599//** Padding applied to the modal title
600// $modal-title-padding: 15px
601//** Modal title line-height
602// $modal-title-line-height: $line-height-base
603
604//** Background color of modal content area
605// $modal-content-bg: #fff
606//** Modal content border color
607// $modal-content-border-color: rgba(0,0,0,.2)
608//** Modal content border color **for IE8**
609// $modal-content-fallback-border-color: #999
610
611//** Modal backdrop background color
612// $modal-backdrop-bg: #000
613//** Modal backdrop opacity
614// $modal-backdrop-opacity: .5
615//** Modal header border color
616// $modal-header-border-color: #e5e5e5
617//** Modal footer border color
618// $modal-footer-border-color: $modal-header-border-color
619
620// $modal-lg: 900px
621// $modal-md: 600px
622// $modal-sm: 300px
623
624
625//== Alerts
626//
627//## Define alert colors, border radius, and padding.
628
629// $alert-padding: 15px
630// $alert-border-radius: $border-radius-base
631// $alert-link-font-weight: bold
632
633// $alert-success-bg: $state-success-bg
634// $alert-success-text: $state-success-text
635// $alert-success-border: $state-success-border
636
637// $alert-info-bg: $state-info-bg
638// $alert-info-text: $state-info-text
639// $alert-info-border: $state-info-border
640
641// $alert-warning-bg: $state-warning-bg
642// $alert-warning-text: $state-warning-text
643// $alert-warning-border: $state-warning-border
644
645// $alert-danger-bg: $state-danger-bg
646// $alert-danger-text: $state-danger-text
647// $alert-danger-border: $state-danger-border
648
649
650//== Progress bars
651//
652//##
653
654//** Background color of the whole progress component
655// $progress-bg: #f5f5f5
656//** Progress bar text color
657// $progress-bar-color: #fff
658//** Variable for setting rounded corners on progress bar.
659// $progress-border-radius: $border-radius-base
660
661//** Default progress bar color
662// $progress-bar-bg: $brand-primary
663//** Success progress bar color
664// $progress-bar-success-bg: $brand-success
665//** Warning progress bar color
666// $progress-bar-warning-bg: $brand-warning
667//** Danger progress bar color
668// $progress-bar-danger-bg: $brand-danger
669//** Info progress bar color
670// $progress-bar-info-bg: $brand-info
671
672
673//== List group
674//
675//##
676
677//** Background color on `.list-group-item`
678// $list-group-bg: #fff
679//** `.list-group-item` border color
680// $list-group-border: #ddd
681//** List group border radius
682// $list-group-border-radius: $border-radius-base
683
684//** Background color of single list items on hover
685// $list-group-hover-bg: #f5f5f5
686//** Text color of active list items
687// $list-group-active-color: $component-active-color
688//** Background color of active list items
689// $list-group-active-bg: $component-active-bg
690//** Border color of active list elements
691// $list-group-active-border: $list-group-active-bg
692//** Text color for content within active list items
693// $list-group-active-text-color: lighten($list-group-active-bg, 40%)
694
695//** Text color of disabled list items
696// $list-group-disabled-color: $gray-light
697//** Background color of disabled list items
698// $list-group-disabled-bg: $gray-lighter
699//** Text color for content within disabled list items
700// $list-group-disabled-text-color: $list-group-disabled-color
701
702// $list-group-link-color: #555
703// $list-group-link-hover-color: $list-group-link-color
704// $list-group-link-heading-color: #333
705
706
707//== Panels
708//
709//##
710
711// $panel-bg: #fff
712// $panel-body-padding: 15px
713// $panel-heading-padding: 10px 15px
714// $panel-footer-padding: $panel-heading-padding
715// $panel-border-radius: $border-radius-base
716
717//** Border color for elements within panels
718// $panel-inner-border: #ddd
719// $panel-footer-bg: #f5f5f5
720
721// $panel-default-text: $gray-dark
722// $panel-default-border: #ddd
723// $panel-default-heading-bg: #f5f5f5
724
725// $panel-primary-text: #fff
726// $panel-primary-border: $brand-primary
727// $panel-primary-heading-bg: $brand-primary
728
729// $panel-success-text: $state-success-text
730// $panel-success-border: $state-success-border
731// $panel-success-heading-bg: $state-success-bg
732
733// $panel-info-text: $state-info-text
734// $panel-info-border: $state-info-border
735// $panel-info-heading-bg: $state-info-bg
736
737// $panel-warning-text: $state-warning-text
738// $panel-warning-border: $state-warning-border
739// $panel-warning-heading-bg: $state-warning-bg
740
741// $panel-danger-text: $state-danger-text
742// $panel-danger-border: $state-danger-border
743// $panel-danger-heading-bg: $state-danger-bg
744
745
746//== Thumbnails
747//
748//##
749
750//** Padding around the thumbnail image
751// $thumbnail-padding: 4px
752//** Thumbnail background color
753// $thumbnail-bg: $body-bg
754//** Thumbnail border color
755// $thumbnail-border: #ddd
756//** Thumbnail border radius
757// $thumbnail-border-radius: $border-radius-base
758
759//** Custom text color for thumbnail captions
760// $thumbnail-caption-color: $text-color
761//** Padding around the thumbnail caption
762// $thumbnail-caption-padding: 9px
763
764
765//== Wells
766//
767//##
768
769// $well-bg: #f5f5f5
770// $well-border: darken($well-bg, 7%)
771
772
773//== Badges
774//
775//##
776
777// $badge-color: #fff
778//** Linked badge text color on hover
779// $badge-link-hover-color: #fff
780// $badge-bg: $gray-light
781
782//** Badge text color in active nav link
783// $badge-active-color: $link-color
784//** Badge background color in active nav link
785// $badge-active-bg: #fff
786
787// $badge-font-weight: bold
788// $badge-line-height: 1
789// $badge-border-radius: 10px
790
791
792//== Breadcrumbs
793//
794//##
795
796// $breadcrumb-padding-vertical: 8px
797// $breadcrumb-padding-horizontal: 15px
798//** Breadcrumb background color
799// $breadcrumb-bg: #f5f5f5
800//** Breadcrumb text color
801// $breadcrumb-color: #ccc
802//** Text color of current page in the breadcrumb
803// $breadcrumb-active-color: $gray-light
804//** Textual separator for between breadcrumb elements
805// $breadcrumb-separator: "/"
806
807
808//== Carousel
809//
810//##
811
812// $carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6)
813
814// $carousel-control-color: #fff
815// $carousel-control-width: 15%
816// $carousel-control-opacity: .5
817// $carousel-control-font-size: 20px
818
819// $carousel-indicator-active-bg: #fff
820// $carousel-indicator-border-color: #fff
821
822// $carousel-caption-color: #fff
823
824
825//== Close
826//
827//##
828
829// $close-font-weight: bold
830// $close-color: #000
831// $close-text-shadow: 0 1px 0 #fff
832
833
834//== Code
835//
836//##
837
838// $code-color: #c7254e
839// $code-bg: #f9f2f4
840
841// $kbd-color: #fff
842// $kbd-bg: #333
843
844// $pre-bg: #f5f5f5
845// $pre-color: $gray-dark
846// $pre-border-color: #ccc
847// $pre-scrollable-max-height: 340px
848
849
850//== Type
851//
852//##
853
854//** Horizontal offset for forms and lists.
855// $component-offset-horizontal: 180px
856//** Text muted color
857// $text-muted: $gray-light
858//** Abbreviations and acronyms border color
859// $abbr-border-color: $gray-light
860//** Headings small color
861// $headings-small-color: $gray-light
862//** Blockquote small color
863// $blockquote-small-color: $gray-light
864//** Blockquote font size
865// $blockquote-font-size: ($font-size-base * 1.25)
866//** Blockquote border color
867// $blockquote-border-color: $gray-lighter
868//** Page header border color
869// $page-header-border-color: $gray-lighter
870//** Width of horizontal description list titles
871// $dl-horizontal-offset: $component-offset-horizontal
872//** Point at which .dl-horizontal becomes horizontal
873// $dl-horizontal-breakpoint: $grid-float-breakpoint
874//** Horizontal line color.
875// $hr-border: $gray-lighter
diff --git a/client/systemjs.bundle.js b/client/systemjs.bundle.js
deleted file mode 100644
index 2fd45156a..000000000
--- a/client/systemjs.bundle.js
+++ /dev/null
@@ -1,15 +0,0 @@
1var SystemBuilder = require('systemjs-builder')
2var builder = new SystemBuilder('node_modules', 'systemjs.config.js')
3
4var toBundle = [
5 'rxjs/Rx',
6 '@angular/common',
7 '@angular/compiler',
8 '@angular/core',
9 '@angular/http',
10 '@angular/platform-browser',
11 '@angular/platform-browser-dynamic',
12 '@angular/router-deprecated'
13]
14
15builder.bundle(toBundle.join(' + '), 'bundles/angular-rxjs.bundle.js')
diff --git a/client/systemjs.config.js b/client/systemjs.config.js
deleted file mode 100644
index d04bc4107..000000000
--- a/client/systemjs.config.js
+++ /dev/null
@@ -1,48 +0,0 @@
1;(function (global) {
2 var map = {
3 'angular-pipes': 'client/node_modules/angular-pipes',
4 'ng2-bootstrap': 'client/node_modules/ng2-bootstrap',
5 'angular-rxjs.bundle': 'client/bundles/angular-rxjs.bundle.js'
6 }
7
8 var packages = {
9 'client': { main: 'main.js', defaultExtension: 'js' },
10 'ng2-bootstrap': { defaultExtension: 'js' },
11 'rxjs': { defaultExtension: 'js' }
12 }
13 var packageNames = [
14 '@angular/common',
15 '@angular/compiler',
16 '@angular/core',
17 '@angular/http',
18 '@angular/platform-browser',
19 '@angular/platform-browser-dynamic',
20 '@angular/router-deprecated',
21 'angular-pipes'
22 ]
23
24 packageNames.forEach(function (pkgName) {
25 packages[pkgName] = { main: 'index.js', defaultExtension: 'js' }
26 })
27
28 var config = {
29 map: map,
30 packages: packages,
31 bundles: {
32 'angular-rxjs.bundle': [
33 'rxjs/Rx.js',
34 '@angular/common/index.js',
35 '@angular/compiler/index.js',
36 '@angular/core/index.js',
37 '@angular/http/index.js',
38 '@angular/platform-browser/index.js',
39 '@angular/platform-browser-dynamic/index.js',
40 '@angular/router-deprecated/index.js'
41 ]
42 }
43 }
44
45 // filterSystemConfig - index.html's chance to modify config before we register it.
46 if (global.filterSystemConfig) global.filterSystemConfig(config)
47 System.config(config)
48})(this)
diff --git a/client/tsconfig.json b/client/tsconfig.json
index a8b8269a4..1832d7b7e 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -20,39 +20,42 @@
20 ], 20 ],
21 "compileOnSave": false, 21 "compileOnSave": false,
22 "files": [ 22 "files": [
23 "app/app.component.ts", 23 "src/app/app.component.ts",
24 "app/friends/friend.service.ts", 24 "src/app/friends/friend.service.ts",
25 "app/friends/index.ts", 25 "src/app/friends/index.ts",
26 "app/login/index.ts", 26 "src/app/login/index.ts",
27 "app/login/login.component.ts", 27 "src/app/login/login.component.ts",
28 "app/shared/index.ts", 28 "src/app/shared/index.ts",
29 "app/shared/search/index.ts", 29 "src/app/shared/search/index.ts",
30 "app/shared/search/search-field.type.ts", 30 "src/app/shared/search/search-field.type.ts",
31 "app/shared/search/search.component.ts", 31 "src/app/shared/search/search.component.ts",
32 "app/shared/search/search.model.ts", 32 "src/app/shared/search/search.model.ts",
33 "app/shared/users/auth-status.model.ts", 33 "src/app/shared/users/auth-status.model.ts",
34 "app/shared/users/auth.service.ts", 34 "src/app/shared/users/auth.service.ts",
35 "app/shared/users/index.ts", 35 "src/app/shared/users/index.ts",
36 "app/shared/users/token.model.ts", 36 "src/app/shared/users/token.model.ts",
37 "app/shared/users/user.model.ts", 37 "src/app/shared/users/user.model.ts",
38 "app/videos/index.ts", 38 "src/app/videos/index.ts",
39 "app/videos/shared/index.ts", 39 "src/app/videos/shared/index.ts",
40 "app/videos/shared/loader/index.ts", 40 "src/app/videos/shared/loader/index.ts",
41 "app/videos/shared/loader/loader.component.ts", 41 "src/app/videos/shared/loader/loader.component.ts",
42 "app/videos/shared/pagination.model.ts", 42 "src/app/videos/shared/pagination.model.ts",
43 "app/videos/shared/sort-field.type.ts", 43 "src/app/videos/shared/sort-field.type.ts",
44 "app/videos/shared/video.model.ts", 44 "src/app/videos/shared/video.model.ts",
45 "app/videos/shared/video.service.ts", 45 "src/app/videos/shared/video.service.ts",
46 "app/videos/video-add/index.ts", 46 "src/app/videos/video-add/index.ts",
47 "app/videos/video-add/video-add.component.ts", 47 "src/app/videos/video-add/video-add.component.ts",
48 "app/videos/video-list/index.ts", 48 "src/app/videos/video-list/index.ts",
49 "app/videos/video-list/video-list.component.ts", 49 "src/app/videos/video-list/video-list.component.ts",
50 "app/videos/video-list/video-miniature.component.ts", 50 "src/app/videos/video-list/video-miniature.component.ts",
51 "app/videos/video-list/video-sort.component.ts", 51 "src/app/videos/video-list/video-sort.component.ts",
52 "app/videos/video-watch/index.ts", 52 "src/app/videos/video-watch/index.ts",
53 "app/videos/video-watch/video-watch.component.ts", 53 "src/app/videos/video-watch/video-watch.component.ts",
54 "app/videos/video-watch/webtorrent.service.ts", 54 "src/app/videos/video-watch/webtorrent.service.ts",
55 "main.ts", 55 "src/custom-typings.d.ts",
56 "src/main.ts",
57 "src/polyfills.ts",
58 "src/vendor.ts",
56 "typings/globals/es6-shim/index.d.ts", 59 "typings/globals/es6-shim/index.d.ts",
57 "typings/globals/jasmine/index.d.ts", 60 "typings/globals/jasmine/index.d.ts",
58 "typings/globals/jquery.fileupload/index.d.ts", 61 "typings/globals/jquery.fileupload/index.d.ts",
diff --git a/client/webpack.config.js b/client/webpack.config.js
new file mode 100644
index 000000000..8f54d88e5
--- /dev/null
+++ b/client/webpack.config.js
@@ -0,0 +1,16 @@
1switch (process.env.NODE_ENV) {
2 case 'prod':
3 case 'production':
4 module.exports = require('./config/webpack.prod')
5 break
6
7 case 'test':
8 case 'testing':
9 module.exports = require('./config/webpack.test')
10 break
11
12 case 'dev':
13 case 'development':
14 default:
15 module.exports = require('./config/webpack.dev')
16}
diff --git a/server.js b/server.js
index 02c0d53cd..4c8e8cfd3 100644
--- a/server.js
+++ b/server.js
@@ -64,7 +64,7 @@ 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('/client', express.static(path.join(__dirname, '/client'), { maxAge: 0 })) 67app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: 0 }))
68// 404 for static files not found 68// 404 for static files not found
69app.use('/client/*', function (req, res, next) { 69app.use('/client/*', function (req, res, next) {
70 res.sendStatus(404) 70 res.sendStatus(404)
@@ -76,7 +76,7 @@ app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnailsPhysicalPath,
76 76
77// Client application 77// Client application
78app.use('/*', function (req, res, next) { 78app.use('/*', function (req, res, next) {
79 res.sendFile(path.join(__dirname, 'client/index.html')) 79 res.sendFile(path.join(__dirname, 'client/dist/index.html'))
80}) 80})
81 81
82// ----------- Tracker ----------- 82// ----------- Tracker -----------