From 24a8e782d8b2adb208d9cfb8659450395e2e2a77 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Dec 2017 09:04:52 +0100 Subject: Add bootstrap analyzer and optimize build --- client/src/app/+admin/admin.module.ts | 2 + client/src/app/shared/shared.module.ts | 3 -- .../shared/video-description.component.ts | 2 +- client/src/sass/include/_bootstrap.scss | 56 ++++++++++++++++++++++ 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 client/src/sass/include/_bootstrap.scss (limited to 'client/src') diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts index c0b006e73..74ceb25ef 100644 --- a/client/src/app/+admin/admin.module.ts +++ b/client/src/app/+admin/admin.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core' import { TabsModule } from 'ngx-bootstrap/tabs' +import { DataTableModule } from 'primeng/components/datatable/datatable' import { SharedModule } from '../shared' import { AdminRoutingModule } from './admin-routing.module' import { AdminComponent } from './admin.component' @@ -16,6 +17,7 @@ import { VideoBlacklistComponent, VideoBlacklistListComponent } from './video-bl imports: [ AdminRoutingModule, TabsModule.forRoot(), + DataTableModule, SharedModule ], diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts index 5af118c98..a5c56cb46 100644 --- a/client/src/app/shared/shared.module.ts +++ b/client/src/app/shared/shared.module.ts @@ -10,7 +10,6 @@ import { ModalModule } from 'ngx-bootstrap/modal' import { InfiniteScrollModule } from 'ngx-infinite-scroll' import { BytesPipe, KeysPipe, NgPipesModule } from 'ngx-pipes' import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared' -import { DataTableModule } from 'primeng/components/datatable/datatable' import { AUTH_INTERCEPTOR_PROVIDER } from './auth' import { DeleteButtonComponent } from './misc/delete-button.component' @@ -39,7 +38,6 @@ import { VideoService } from './video/video.service' BsDropdownModule.forRoot(), ModalModule.forRoot(), - DataTableModule, PrimeSharedModule, InfiniteScrollModule, NgPipesModule @@ -66,7 +64,6 @@ import { VideoService } from './video/video.service' BsDropdownModule, ModalModule, - DataTableModule, PrimeSharedModule, InfiniteScrollModule, BytesPipe, diff --git a/client/src/app/videos/+video-edit/shared/video-description.component.ts b/client/src/app/videos/+video-edit/shared/video-description.component.ts index 9b77a27e6..34dbc21a6 100644 --- a/client/src/app/videos/+video-edit/shared/video-description.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-description.component.ts @@ -1,10 +1,10 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core' import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' -import { truncate } from 'lodash' import 'rxjs/add/operator/debounceTime' import 'rxjs/add/operator/distinctUntilChanged' import { Subject } from 'rxjs/Subject' import { MarkdownService } from '../../shared' +import truncate from 'lodash-es/truncate' @Component({ selector: 'my-video-description', diff --git a/client/src/sass/include/_bootstrap.scss b/client/src/sass/include/_bootstrap.scss new file mode 100644 index 000000000..e72d1def2 --- /dev/null +++ b/client/src/sass/include/_bootstrap.scss @@ -0,0 +1,56 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +// Core variables and mixins +@import "bootstrap/variables"; +@import "bootstrap/mixins"; + +// Reset and dependencies +@import "bootstrap/normalize"; +@import "bootstrap/print"; +@import "bootstrap/glyphicons"; + +// Core CSS +@import "bootstrap/scaffolding"; +@import "bootstrap/type"; +@import "bootstrap/code"; +@import "bootstrap/grid"; +@import "bootstrap/tables"; +@import "bootstrap/forms"; +@import "bootstrap/buttons"; + +// Components +@import "bootstrap/component-animations"; +@import "bootstrap/dropdowns"; +@import "bootstrap/button-groups"; +@import "bootstrap/input-groups"; +@import "bootstrap/navs"; +@import "bootstrap/navbar"; +@import "bootstrap/breadcrumbs"; +@import "bootstrap/pagination"; +@import "bootstrap/pager"; +@import "bootstrap/labels"; +@import "bootstrap/badges"; +@import "bootstrap/jumbotron"; +@import "bootstrap/thumbnails"; +@import "bootstrap/alerts"; +@import "bootstrap/progress-bars"; +@import "bootstrap/media"; +@import "bootstrap/list-group"; +@import "bootstrap/panels"; +@import "bootstrap/responsive-embed"; +@import "bootstrap/wells"; +@import "bootstrap/close"; + +// Components w/ JavaScript +@import "bootstrap/modals"; +@import "bootstrap/tooltip"; +@import "bootstrap/popovers"; +@import "bootstrap/carousel"; + +// Utility classes +@import "bootstrap/utilities"; +@import "bootstrap/responsive-utilities"; -- cgit v1.2.3