]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Optimize imports
authorChocobozzz <florian.bigard@gmail.com>
Thu, 14 Sep 2017 20:16:39 +0000 (22:16 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Thu, 14 Sep 2017 20:16:39 +0000 (22:16 +0200)
client/config/webpack.common.js
client/config/webpack.dev.js
client/config/webpack.prod.js
client/src/app/+admin/users/shared/user.service.ts
client/src/app/+admin/users/user-list/user-list.component.ts
client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts
client/src/app/shared/rest/rest-table.ts
client/src/app/shared/rest/rest.service.ts
client/src/app/shared/shared.module.ts
client/src/app/shared/video-abuse/video-abuse.service.ts

index 7392c58d395ae026cef5ab756707621688c46517..000699aa5396d4e157a34459170f846404e6c396 100644 (file)
@@ -5,7 +5,6 @@ const helpers = require('./helpers')
  */
 
 const AssetsPlugin = require('assets-webpack-plugin')
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
 const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin')
 const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin')
 const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin
@@ -297,30 +296,6 @@ module.exports = function (options) {
       new ngcWebpack.NgcWebpackPlugin({
         disabled: !AOT,
         tsConfig: helpers.root('tsconfig.webpack.json')
-      }),
-
-      new BundleAnalyzerPlugin({
-        // Can be `server`, `static` or `disabled`.
-        // In `server` mode analyzer will start HTTP server to show bundle report.
-        // In `static` mode single HTML file with bundle report will be generated.
-        // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
-        analyzerMode: 'static',
-        // Path to bundle report file that will be generated in `static` mode.
-        // Relative to bundles output directory.
-        reportFilename: 'report.html',
-        // Automatically open report in default browser
-        openAnalyzer: false,
-        // If `true`, Webpack Stats JSON file will be generated in bundles output directory
-        generateStatsFile: true,
-        // Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
-        // Relative to bundles output directory.
-        statsFilename: 'stats.json',
-        // Options for `stats.toJson()` method.
-        // For example you can exclude sources of your modules from stats file with `source: false` option.
-        // See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
-        statsOptions: null,
-        // Log level. Can be 'info', 'warn', 'error' or 'silent'.
-        logLevel: 'info'
       })
     ],
 
index 8948af9b23296fcdd5fcc2a9001da22f8730bd27..d825f40e08f2bf2080822e40b6c71a3a35936b68 100644 (file)
@@ -91,28 +91,6 @@ module.exports = function (env) {
         libraryTarget: 'var'
       },
 
-      module: {
-
-        // Too slow, life is short
-        // rules: [
-        //   {
-        //     test: /\.ts$/,
-        //     use: [
-        //       {
-        //         loader: 'tslint-loader',
-        //         options: {
-        //           configFile: 'tslint.json'
-        //         }
-        //       }
-        //     ],
-        //     exclude: [
-        //       /\.(spec|e2e)\.ts$/,
-        //       /node_modules\//
-        //     ]
-        //   }
-        // ]
-      },
-
       plugins: [
 
         /**
index fc47f03a0be1216fcd8286a8cf1f5cd6261027d8..777c816e85db389f6ba5f2f07ff9a94cabd23617 100644 (file)
@@ -11,6 +11,7 @@ const videoEmbedConfig = require('./webpack.video-embed.js')
  * Webpack Plugins
  */
 const DefinePlugin = require('webpack/lib/DefinePlugin')
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
 const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
 const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin')
 const OptimizeJsPlugin = require('optimize-js-plugin')
@@ -249,6 +250,30 @@ module.exports = function (env) {
               path: helpers.root('dist')
             }
           }
+        }),
+
+        new BundleAnalyzerPlugin({
+          // Can be `server`, `static` or `disabled`.
+          // In `server` mode analyzer will start HTTP server to show bundle report.
+          // In `static` mode single HTML file with bundle report will be generated.
+          // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
+          analyzerMode: 'static',
+          // Path to bundle report file that will be generated in `static` mode.
+          // Relative to bundles output directory.
+          reportFilename: 'report.html',
+          // Automatically open report in default browser
+          openAnalyzer: false,
+          // If `true`, Webpack Stats JSON file will be generated in bundles output directory
+          generateStatsFile: true,
+          // Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
+          // Relative to bundles output directory.
+          statsFilename: 'stats.json',
+          // Options for `stats.toJson()` method.
+          // For example you can exclude sources of your modules from stats file with `source: false` option.
+          // See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
+          statsOptions: null,
+          // Log level. Can be 'info', 'warn', 'error' or 'silent'.
+          logLevel: 'info'
         })
       ],
 
index a4b89bf1d5e31e06105b6bd1eadfb56860cc5597..e4bd5df3770d9179f9ea797d1206ad317c58b561 100644 (file)
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable'
 import 'rxjs/add/operator/catch'
 import 'rxjs/add/operator/map'
 
-import { SortMeta } from 'primeng/primeng'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'
 
 import { RestExtractor, User, RestPagination, RestService } from '../../../shared'
index 73b5c0ce9899093282f276759bc55c5ff5d6c660..6debf89beb1d177216e7a9712533c7b2b221a267 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core'
-import { SortMeta } from 'primeng/primeng'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 
 import { NotificationsService } from 'angular2-notifications'
 
index 92de11f0e38173af9f6ff5d36b4fcda8b4368f40..654603d016580000c4417c11d0c7ed378cce7870 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, OnInit } from '@angular/core'
 
 import { NotificationsService } from 'angular2-notifications'
-import { SortMeta } from 'primeng/primeng'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 
 import { RestTable, RestPagination, VideoAbuseService } from '../../../shared'
 import { VideoAbuse } from '../../../../../../shared'
index db2cb5e1487bba94d622c292e521b744d8b2a1d1..d04d91c688b046486031653aa9fa115c8dcafd66 100644 (file)
@@ -1,4 +1,5 @@
-import { LazyLoadEvent, SortMeta } from 'primeng/primeng'
+import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 
 import { RestPagination } from './rest-pagination'
 
index f7838ba06a51e899a7cf784af2369f098da801a3..a1c3010501c1bdecc46b60655843aff4030336f0 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core'
 import { HttpParams } from '@angular/common/http'
-import { SortMeta } from 'primeng/primeng'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 
 import { RestPagination } from './rest-pagination'
 
index a28ac322da9d534456d2e0cc15ca2d10d2976e7b..56da62fc4a3f7bec80863adf3ff5f78c16e0803a 100644 (file)
@@ -10,7 +10,8 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
 import { ProgressbarModule } from 'ngx-bootstrap/progressbar'
 import { PaginationModule } from 'ngx-bootstrap/pagination'
 import { ModalModule } from 'ngx-bootstrap/modal'
-import { DataTableModule, SharedModule as PrimeSharedModule } from 'primeng/primeng'
+import { DataTableModule } from 'primeng/components/datatable/datatable'
+import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
 
 import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
 import { RestExtractor, RestService } from './rest'
index 98458111415c52d7676b7f728fd26f1fc6a75e68..8d979de31ebd3c8d956300ca0104d82af7a07fed 100644 (file)
@@ -4,7 +4,7 @@ import 'rxjs/add/operator/catch'
 import 'rxjs/add/operator/map'
 import { Observable } from 'rxjs/Observable'
 
-import { SortMeta } from 'primeng/primeng'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 
 import { AuthService } from '../core'
 import { RestExtractor, RestPagination, RestService } from '../rest'