From d1d2d341a94be29fd6c999db507108c83ddad54c Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Mon, 23 Dec 2019 22:24:34 +0100 Subject: [PATCH 1/6] Created TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md --- TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md diff --git a/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md b/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md new file mode 100644 index 000000000..898c13f5a --- /dev/null +++ b/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md @@ -0,0 +1,31 @@ +# Techniques to pull data from EvalAI within EvalAI-ngx without using 'git clone' in dockerfile + +The techniques for pulling code from EvalAi from within EvalAI-ngx are as follows: + +### 1. Using Shared Volumes +Docker allows for mounting local directories into containers using the shared volumes feature. Just use the -v switch to specify the local directory path that you wish to mount, along with the location where it should be mounted within the running container: + +`docker run -d -P --name -v /path/to/local/directory:/path/to/container/directory ` + +Using this command, the host's directory becomes accessible to the container under the path you specify. This is particularly useful when developing locally, as you can use your favorite editor to work locally, commit code to Git, and pull the latest code from remote branches. + +Your application will run inside a container, isolating it away from any processes you have running on your development laptop. The container instance will also have access to other instances, such as those running to provide databases, message brokers and other services. + +In this scenario, all containers on the same host would share the same shared codebase and binaries at the same time. Versioning of code should occur within the Docker image, not at the host volume. Therefore, it's not recommended to use shared volumes in production. + +### 2. Using the ADD or COPY command +You can use the COPY command within a Dockerfile to copy files from the local filesystem into a specific directory within the container. The following Dockerfile example would recursively add the current working directory into the /app directory of the container image: + +``` +RUN mkdir /app +COPY . /app +``` + +The ADD command is similar to the COPY command, but has the added advantage of fetching remote URLs and extracting tarballs. + +According to Docker's best practices guide, COPY is recommended for most cases. This technique is recommended for building production-ready Docker images. + + + + +#### In summary, use Docker ADD COPY for production and shared volumes for development, while avoiding the use of Git within containers for security reasons. From d110d145e592eb6ae86e5156347cd769b778d449 Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Wed, 15 Jan 2020 11:16:25 +0100 Subject: [PATCH 2/6] Lazy loaded compoents to reduce bundle size --- TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md | 31 ---- src/app/app-routing.module.ts | 110 +++----------- src/app/app.module.ts | 143 ++---------------- .../components/about/about-routing.module.ts | 16 ++ src/app/components/about/about.module.ts | 21 +++ .../analytics/analytics-routing.module.ts | 21 +++ .../components/analytics/analytics.module.ts | 24 +++ .../components/auth/auth-routing.module.ts | 30 ++++ src/app/components/auth/auth.module.ts | 42 +++++ .../challenge-create-routing.module.ts | 17 +++ .../challenge-create.module.ts | 21 +++ .../challenge/challenge-routing.module.ts | 45 ++++++ .../components/challenge/challenge.module.ts | 64 ++++++++ .../contact/contact-routing.module.ts | 16 ++ src/app/components/contact/contact.module.ts | 20 +++ .../dashboard/dashboard-routing.module.ts | 16 ++ .../components/dashboard/dashboard.module.ts | 23 +++ .../get-involved-routing.module.ts | 16 ++ .../get-involved/get-involved.module.ts | 21 +++ .../components/home/home-routing.module.ts | 17 +++ src/app/components/home/home.module.ts | 40 +++++ .../our-team/our-team-routing.module.ts | 17 +++ .../components/our-team/our-team.module.ts | 21 +++ .../privacy-policy-routing.module.ts | 17 +++ .../privacy-policy/privacy-policy.module.ts | 20 +++ .../profile/profile-routing.module.ts | 17 +++ src/app/components/profile/profile.module.ts | 19 +++ .../challengelist/challengelist.module.ts | 32 ++++ .../publiclists/publiclists-routing.module.ts | 43 ++++++ .../publiclists/publiclists.module.ts | 39 +++++ src/app/components/utility/utility.module.ts | 56 +++++++ src/app/shared.module.ts | 42 +++++ src/tsconfig.app.json | 2 +- tsconfig.json | 2 +- 34 files changed, 828 insertions(+), 253 deletions(-) delete mode 100644 TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md create mode 100644 src/app/components/about/about-routing.module.ts create mode 100644 src/app/components/about/about.module.ts create mode 100644 src/app/components/analytics/analytics-routing.module.ts create mode 100644 src/app/components/analytics/analytics.module.ts create mode 100644 src/app/components/auth/auth-routing.module.ts create mode 100644 src/app/components/auth/auth.module.ts create mode 100644 src/app/components/challenge-create/challenge-create-routing.module.ts create mode 100644 src/app/components/challenge-create/challenge-create.module.ts create mode 100644 src/app/components/challenge/challenge-routing.module.ts create mode 100644 src/app/components/challenge/challenge.module.ts create mode 100644 src/app/components/contact/contact-routing.module.ts create mode 100644 src/app/components/contact/contact.module.ts create mode 100644 src/app/components/dashboard/dashboard-routing.module.ts create mode 100644 src/app/components/dashboard/dashboard.module.ts create mode 100644 src/app/components/get-involved/get-involved-routing.module.ts create mode 100644 src/app/components/get-involved/get-involved.module.ts create mode 100644 src/app/components/home/home-routing.module.ts create mode 100644 src/app/components/home/home.module.ts create mode 100644 src/app/components/our-team/our-team-routing.module.ts create mode 100644 src/app/components/our-team/our-team.module.ts create mode 100644 src/app/components/privacy-policy/privacy-policy-routing.module.ts create mode 100644 src/app/components/privacy-policy/privacy-policy.module.ts create mode 100644 src/app/components/profile/profile-routing.module.ts create mode 100644 src/app/components/profile/profile.module.ts create mode 100644 src/app/components/publiclists/challengelist/challengelist.module.ts create mode 100644 src/app/components/publiclists/publiclists-routing.module.ts create mode 100644 src/app/components/publiclists/publiclists.module.ts create mode 100644 src/app/components/utility/utility.module.ts create mode 100644 src/app/shared.module.ts diff --git a/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md b/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md deleted file mode 100644 index 898c13f5a..000000000 --- a/TECHNIQUES_TO_PULL_DATA_FROM_EVALAI.md +++ /dev/null @@ -1,31 +0,0 @@ -# Techniques to pull data from EvalAI within EvalAI-ngx without using 'git clone' in dockerfile - -The techniques for pulling code from EvalAi from within EvalAI-ngx are as follows: - -### 1. Using Shared Volumes -Docker allows for mounting local directories into containers using the shared volumes feature. Just use the -v switch to specify the local directory path that you wish to mount, along with the location where it should be mounted within the running container: - -`docker run -d -P --name -v /path/to/local/directory:/path/to/container/directory ` - -Using this command, the host's directory becomes accessible to the container under the path you specify. This is particularly useful when developing locally, as you can use your favorite editor to work locally, commit code to Git, and pull the latest code from remote branches. - -Your application will run inside a container, isolating it away from any processes you have running on your development laptop. The container instance will also have access to other instances, such as those running to provide databases, message brokers and other services. - -In this scenario, all containers on the same host would share the same shared codebase and binaries at the same time. Versioning of code should occur within the Docker image, not at the host volume. Therefore, it's not recommended to use shared volumes in production. - -### 2. Using the ADD or COPY command -You can use the COPY command within a Dockerfile to copy files from the local filesystem into a specific directory within the container. The following Dockerfile example would recursively add the current working directory into the /app directory of the container image: - -``` -RUN mkdir /app -COPY . /app -``` - -The ADD command is similar to the COPY command, but has the added advantage of fetching remote URLs and extracting tarballs. - -According to Docker's best practices guide, COPY is recommended for most cases. This technique is recommended for building production-ready Docker images. - - - - -#### In summary, use Docker ADD COPY for production and shared volumes for development, while avoiding the use of Git within containers for security reasons. diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 53507f122..2dfa72a0f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,64 +1,23 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { RouterModule, Routes } from '@angular/router'; -import { HomeComponent } from './components/home/home.component'; -import { AuthComponent } from './components/auth/auth.component'; -import { LoginComponent } from './components/auth/login/login.component'; -import { SignupComponent } from './components/auth/signup/signup.component'; -import { VerifyEmailComponent } from './components/auth/verify-email/verify-email.component'; -import { PubliclistsComponent } from './components/publiclists/publiclists.component'; -import { ChallengelistComponent } from './components/publiclists/challengelist/challengelist.component'; -import { TeamlistComponent } from './components/publiclists/teamlist/teamlist.component'; -import { ContactComponent } from './components/contact/contact.component'; -import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component'; -import { GetInvolvedComponent } from './components/get-involved/get-involved.component'; -import { AboutComponent } from './components/about/about.component'; -import { ChallengeComponent } from './components/challenge/challenge.component'; -import { ChallengesettingsComponent } from './components/challenge/challengesettings/challengesettings.component'; -import { ChallengeoverviewComponent} from './components/challenge/challengeoverview/challengeoverview.component'; -import { ChallengeevaluationComponent } from './components/challenge/challengeevaluation/challengeevaluation.component'; -import { ChallengephasesComponent} from './components/challenge/challengephases/challengephases.component'; -import { ChallengeparticipateComponent } from './components/challenge/challengeparticipate/challengeparticipate.component'; -import { ChallengeleaderboardComponent } from './components/challenge/challengeleaderboard/challengeleaderboard.component'; -import { ChallengesubmitComponent } from './components/challenge/challengesubmit/challengesubmit.component'; -import { ChallengesubmissionsComponent } from './components/challenge/challengesubmissions/challengesubmissions.component'; -import { - ChallengeviewallsubmissionsComponent -} from './components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component'; -import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component'; -import { DashboardComponent } from './components/dashboard/dashboard.component'; -import { ProfileComponent } from './components/profile/profile.component'; -import { OurTeamComponent } from './components/our-team/our-team.component'; +import { RouterModule, Routes, PreloadAllModules } from '@angular/router'; import { NotFoundComponent } from './components/not-found/not-found.component'; -import {AnalyticsComponent} from './components/analytics/analytics.component'; -import {HostAnalyticsComponent} from './components/analytics/host-analytics/host-analytics.component'; -import {ResetPasswordComponent} from './components/auth/reset-password/reset-password.component'; -import {ResetPasswordConfirmComponent} from './components/auth/reset-password-confirm/reset-password-confirm.component'; const routes: Routes = [ { path: '', - component: HomeComponent, + loadChildren: () => import('./components/home/home.module').then(m => m.HomeModule), data: { 'title': 'EvalAI - Welcome' } }, { path: 'about', - component: AboutComponent + loadChildren: () => import('./components/about/about.module').then(m => m.AboutModule), }, { path: 'auth', - component: AuthComponent, - children: [ - {path: '', redirectTo: 'login', pathMatch: 'full'}, - {path: 'login', component: LoginComponent}, - {path: 'reset-password', component: ResetPasswordComponent}, - {path: 'reset-password/confirm/:user_id/:reset_token', component: ResetPasswordConfirmComponent}, - {path: 'signup', component: SignupComponent}, - {path: 'verify-email/:token', component: VerifyEmailComponent}, - {path: '**', redirectTo: 'login'} - ] + loadChildren: () => import('./components/auth/auth.module').then(m => m.AuthModule) }, { path: 'challenge', @@ -66,77 +25,47 @@ const routes: Routes = [ }, { path: 'challenge/:id', - component: ChallengeComponent, - children: [ - {path: '', redirectTo: 'overview', pathMatch: 'full'}, - {path: 'overview', component: ChallengeoverviewComponent}, - {path: 'evaluation', component: ChallengeevaluationComponent}, - {path: 'phases', component: ChallengephasesComponent}, - {path: 'participate', component: ChallengeparticipateComponent}, - {path: 'submit', component: ChallengesubmitComponent}, - {path: 'my-submissions', component: ChallengesubmissionsComponent}, - {path: 'my-submissions/:phase', component: ChallengesubmissionsComponent}, - {path: 'mysubmissions/:phase/:submission', component: ChallengesubmissionsComponent}, - {path: 'view-all-submissions', component: ChallengeviewallsubmissionsComponent}, - {path: 'leaderboard', component: ChallengeleaderboardComponent}, - {path: 'leaderboard/:split', component: ChallengeleaderboardComponent}, - {path: 'leaderboard/:split/:entry', component: ChallengeleaderboardComponent}, - {path: 'settings', component: ChallengesettingsComponent} - ] + loadChildren: () => import('./components/challenge/challenge.module').then(m => m.ChallengeModule) }, { path: 'challenges', - component: PubliclistsComponent, - children: [ - {path: '', redirectTo: 'all', pathMatch: 'full'}, - {path: 'all', component: ChallengelistComponent}, - {path: 'me', component: ChallengelistComponent} - ] + loadChildren: () => import('./components/publiclists/publiclists.module').then(m => m.PubliclistsModule) }, { path: 'challenge-create', - component: ChallengeCreateComponent + loadChildren: () => import('./components/challenge-create/challenge-create.module').then(m => m.ChallengeCreateModule) }, { path: 'contact', - component: ContactComponent + loadChildren: () => import('./components/contact/contact.module').then(m => m.ContactModule) }, { path: 'dashboard', - component: DashboardComponent, + loadChildren: () => import('./components/dashboard/dashboard.module').then(m => m.DashboardModule) }, { path: 'analytics', - component: AnalyticsComponent, - children: [ - {path: '', redirectTo: 'host-analytics', pathMatch: 'full'}, - {path: 'host-analytics', component: HostAnalyticsComponent} - ] + loadChildren: () => import('./components/analytics/analytics.module').then(m => m.AnalyticsModule) }, { path: 'get-involved', - component: GetInvolvedComponent + loadChildren: () => import('./components/get-involved/get-involved.module').then(m => m.GetInvolvedModule) }, { path: 'our-team', - component: OurTeamComponent + loadChildren: () => import('./components/our-team/our-team.module').then(m => m.OurTeamModule) }, { path: 'privacy-policy', - component: PrivacyPolicyComponent + loadChildren: () => import('./components/privacy-policy/privacy-policy.module').then(m => m.PrivacyPolicyModule) }, { path: 'profile', - component: ProfileComponent + loadChildren: () => import('./components/profile/profile.module').then(m => m.ProfileModule) }, { path: 'teams', - component: PubliclistsComponent, - children: [ - {path: '', redirectTo: 'participants', pathMatch: 'full'}, - {path: 'participants', component: TeamlistComponent}, - {path: 'hosts', component: TeamlistComponent} - ] + loadChildren: () => import('./components/publiclists/publiclists.module').then(m => m.TeamlistsModule) }, { path: '404', @@ -150,7 +79,14 @@ const routes: Routes = [ ]; @NgModule({ - imports: [ RouterModule.forRoot(routes) ], + imports: [ + RouterModule.forRoot( + routes, + { + preloadingStrategy: PreloadAllModules + } + ) + ], exports: [ RouterModule ] }) export class AppRoutingModule {} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 99f1769ae..eb21ade64 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,15 +2,7 @@ import { BrowserModule } from '@angular/platform-browser'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; -import { EmailValidator, FormsModule } from '@angular/forms'; -import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg'; -import { TextareaAutosizeModule } from 'ngx-textarea-autosize'; -import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime'; -import { MatSelectModule } from '@angular/material/select'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatIconModule } from '@angular/material/icon'; -import { MatCheckboxModule } from '@angular/material'; +import { EmailValidator } from '@angular/forms'; // Import serivces import { AuthService } from './services/auth.service'; @@ -23,150 +15,35 @@ import { EndpointsService } from './services/endpoints.service'; // Import Components import { AppComponent } from './app.component'; -import { HomeComponent } from './components/home/home.component'; import { AppRoutingModule } from './app-routing.module'; -import { HeaderStaticComponent } from './components/nav/header-static/header-static.component'; -import { ContactComponent } from './components/contact/contact.component'; -import { FooterComponent } from './components/nav/footer/footer.component'; -import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component'; -import { InputComponent } from './components/utility/input/input.component'; -import { AuthComponent } from './components/auth/auth.component'; -import { LoginComponent } from './components/auth/login/login.component'; -import { SignupComponent } from './components/auth/signup/signup.component'; -import { ToastComponent } from './components/utility/toast/toast.component'; -import { GetInvolvedComponent } from './components/get-involved/get-involved.component'; -import { AboutComponent } from './components/about/about.component'; -import { CardlistComponent } from './components/utility/cardlist/cardlist.component'; -import { ChallengecardComponent } from './components/publiclists/challengelist/challengecard/challengecard.component'; -import { ChallengelistComponent } from './components/publiclists/challengelist/challengelist.component'; -import { TeamcardComponent } from './components/publiclists/teamlist/teamcard/teamcard.component'; -import { TeamlistComponent } from './components/publiclists/teamlist/teamlist.component'; -import { PubliclistsComponent } from './components/publiclists/publiclists.component'; -import { ForceloginComponent } from './components/utility/forcelogin/forcelogin.component'; -import { ChallengeComponent } from './components/challenge/challenge.component'; -import { ChallengeoverviewComponent } from './components/challenge/challengeoverview/challengeoverview.component'; -import { ChallengeevaluationComponent } from './components/challenge/challengeevaluation/challengeevaluation.component'; -import { ChallengephasesComponent } from './components/challenge/challengephases/challengephases.component'; -import { ChallengeparticipateComponent } from './components/challenge/challengeparticipate/challengeparticipate.component'; -import { ChallengeleaderboardComponent } from './components/challenge/challengeleaderboard/challengeleaderboard.component'; -import { ChallengesubmitComponent } from './components/challenge/challengesubmit/challengesubmit.component'; -import { ChallengesubmissionsComponent } from './components/challenge/challengesubmissions/challengesubmissions.component'; -import { PhasecardComponent } from './components/challenge/challengephases/phasecard/phasecard.component'; -import { ConfirmComponent } from './components/utility/confirm/confirm.component'; -import { LoadingComponent } from './components/utility/loading/loading.component'; -import { SelectphaseComponent } from './components/utility/selectphase/selectphase.component'; -import { HomemainComponent } from './components/home/homemain/homemain.component'; -import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component'; -import { VerifyEmailComponent } from './components/auth/verify-email/verify-email.component'; -import { ModalComponent } from './components/utility/modal/modal.component'; -import { DashboardComponent } from './components/dashboard/dashboard.component'; -import { ProfileComponent } from './components/profile/profile.component'; -import { NotFoundComponent } from './components/not-found/not-found.component'; -import { OurTeamComponent } from './components/our-team/our-team.component'; -import { TwitterFeedComponent } from './components/home/twitter-feed/twitter-feed.component'; -import { NgxTwitterTimelineModule } from 'ngx-twitter-timeline'; -import { PartnersComponent } from './components/home/partners/partners.component'; -import { RulesComponent } from './components/home/rules/rules.component'; -import { TestimonialsComponent } from './components/home/testimonials/testimonials.component'; -import { FeaturedChallengesComponent } from './components/home/featured-challenges/featured-challenges.component'; -import { ChallengesettingsComponent } from './components/challenge/challengesettings/challengesettings.component'; -import { AnalyticsComponent } from './components/analytics/analytics.component'; -import { HostAnalyticsComponent } from './components/analytics/host-analytics/host-analytics.component'; -import { EditphasemodalComponent } from './components/challenge/challengephases/editphasemodal/editphasemodal.component'; import { TermsAndConditionsModalComponent } from './components/challenge/challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.component'; -import { - ChallengeviewallsubmissionsComponent -} from './components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component'; -import { SideBarComponent } from './components/utility/side-bar/side-bar.component'; +import { EditphasemodalComponent } from './components/challenge/challengephases/editphasemodal/editphasemodal.component'; +import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg'; +import { ModalComponent } from './components/utility/modal/modal.component'; +import { ToastComponent } from './/components/utility/toast/toast.component'; import { MatTableModule } from '@angular/material/table'; import { MatDividerModule } from '@angular/material/divider'; -import { DashboardContentComponent } from './components/dashboard/dashboard-content/dashboard-content.component'; -import {PasswordMismatchValidatorDirective} from './Directives/password.validator'; -import { ResetPasswordComponent } from './components/auth/reset-password/reset-password.component'; -import { EmailValidatorDirective } from './Directives/email.validator'; -import { ResetPasswordConfirmComponent } from './components/auth/reset-password-confirm/reset-password-confirm.component'; +import { SharedModule } from './shared.module'; + @NgModule({ declarations: [ AppComponent, - HomeComponent, - HeaderStaticComponent, - FooterComponent, - PrivacyPolicyComponent, - InputComponent, - AuthComponent, - LoginComponent, - SignupComponent, - ContactComponent, - ToastComponent, - GetInvolvedComponent, - AboutComponent, - CardlistComponent, - ChallengecardComponent, - ChallengelistComponent, - TeamcardComponent, - TeamlistComponent, - PubliclistsComponent, - ForceloginComponent, - ChallengeComponent, - ChallengeoverviewComponent, - ChallengeevaluationComponent, - ChallengephasesComponent, - ChallengeparticipateComponent, - ChallengeleaderboardComponent, - ChallengesubmitComponent, - ChallengesubmissionsComponent, - PhasecardComponent, - ConfirmComponent, - LoadingComponent, - SelectphaseComponent, - HomemainComponent, - ChallengeCreateComponent, - VerifyEmailComponent, - ModalComponent, - DashboardComponent, - ProfileComponent, - NotFoundComponent, - OurTeamComponent, - TwitterFeedComponent, - PartnersComponent, - RulesComponent, - TestimonialsComponent, - ChallengesettingsComponent, - SideBarComponent, - AnalyticsComponent, - FeaturedChallengesComponent, - DashboardContentComponent, - HostAnalyticsComponent, - PasswordMismatchValidatorDirective, - EmailValidatorDirective, - ResetPasswordComponent, EditphasemodalComponent, - ResetPasswordConfirmComponent, - ChallengeviewallsubmissionsComponent, + ModalComponent, + ToastComponent, TermsAndConditionsModalComponent ], imports: [ BrowserModule, BrowserAnimationsModule, AppRoutingModule, + SharedModule, HttpClientModule, - FormsModule, - NgxTwitterTimelineModule, FroalaEditorModule.forRoot(), FroalaViewModule.forRoot(), - TextareaAutosizeModule, - OwlDateTimeModule, - OwlNativeDateTimeModule, - MatSelectModule, - MatChipsModule, - MatMenuModule, - MatIconModule, - MatTableModule, - MatDividerModule, - MatCheckboxModule ], providers: [ AuthService, diff --git a/src/app/components/about/about-routing.module.ts b/src/app/components/about/about-routing.module.ts new file mode 100644 index 000000000..3940652c0 --- /dev/null +++ b/src/app/components/about/about-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { AboutComponent } from './about.component'; + +const routes: Routes = [ + { + path: '', + component: AboutComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AboutRoutingModule { } diff --git a/src/app/components/about/about.module.ts b/src/app/components/about/about.module.ts new file mode 100644 index 000000000..9c1adf89c --- /dev/null +++ b/src/app/components/about/about.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { AboutComponent } from './about.component'; +import { AboutRoutingModule } from './about-routing.module'; +import { SharedModule } from '../../shared.module'; + +@NgModule({ + declarations: [ + AboutComponent + ], + imports: [ + CommonModule, + AboutRoutingModule, + SharedModule, + ], + exports: [ + AboutComponent + ] +}) +export class AboutModule { } diff --git a/src/app/components/analytics/analytics-routing.module.ts b/src/app/components/analytics/analytics-routing.module.ts new file mode 100644 index 000000000..09b5d1ad5 --- /dev/null +++ b/src/app/components/analytics/analytics-routing.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { AnalyticsComponent} from './analytics.component'; +import { HostAnalyticsComponent } from './host-analytics/host-analytics.component'; + +const routes: Routes = [ + { + path: '', + component: AnalyticsComponent, + children: [ + {path: '', redirectTo: 'host-analytics', pathMatch: 'full'}, + {path: 'host-analytics', component: HostAnalyticsComponent} + ] + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AnalyticsRoutingModule { } diff --git a/src/app/components/analytics/analytics.module.ts b/src/app/components/analytics/analytics.module.ts new file mode 100644 index 000000000..b13a1e7be --- /dev/null +++ b/src/app/components/analytics/analytics.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; +import { AnalyticsRoutingModule } from './analytics-routing.module'; + +import { AnalyticsComponent } from './analytics.component'; +import { HostAnalyticsComponent } from './host-analytics/host-analytics.component'; + +@NgModule({ + declarations: [ + AnalyticsComponent, + HostAnalyticsComponent + ], + imports: [ + CommonModule, + AnalyticsRoutingModule, + SharedModule + ], + exports: [ + AnalyticsComponent, + HostAnalyticsComponent + ], +}) +export class AnalyticsModule { } diff --git a/src/app/components/auth/auth-routing.module.ts b/src/app/components/auth/auth-routing.module.ts new file mode 100644 index 000000000..02fb7d5cb --- /dev/null +++ b/src/app/components/auth/auth-routing.module.ts @@ -0,0 +1,30 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { AuthComponent } from './auth.component'; +import { LoginComponent } from './login/login.component'; +import { SignupComponent } from './signup/signup.component'; +import { VerifyEmailComponent } from './verify-email/verify-email.component'; +import { ResetPasswordComponent } from './reset-password/reset-password.component'; +import { ResetPasswordConfirmComponent } from './reset-password-confirm/reset-password-confirm.component'; + +const routes: Routes = [ + { + path: '', + component: AuthComponent, + children: [ + {path: '', redirectTo: 'login', pathMatch: 'full'}, + {path: 'login', component: LoginComponent}, + {path: 'reset-password', component: ResetPasswordComponent}, + {path: 'reset-password/confirm/:user_id/:reset_token', component: ResetPasswordConfirmComponent}, + {path: 'signup', component: SignupComponent}, + {path: 'verify-email/:token', component: VerifyEmailComponent}, + {path: '**', redirectTo: 'login'} + ] + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AuthRoutingModule { } diff --git a/src/app/components/auth/auth.module.ts b/src/app/components/auth/auth.module.ts new file mode 100644 index 000000000..8f179eb5b --- /dev/null +++ b/src/app/components/auth/auth.module.ts @@ -0,0 +1,42 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { ReactiveFormsModule } from '@angular/forms'; + +import { AuthRoutingModule } from './auth-routing.module'; + +import { AuthComponent } from './auth.component'; +import { LoginComponent } from './login/login.component'; +import { SignupComponent } from './signup/signup.component'; +import { ResetPasswordConfirmComponent } from './reset-password-confirm/reset-password-confirm.component'; +import { ResetPasswordComponent } from './reset-password/reset-password.component'; +import { VerifyEmailComponent } from './verify-email/verify-email.component'; + +import { SharedModule } from '../../shared.module'; + + + +@NgModule({ + declarations: [ + AuthComponent, + LoginComponent, + SignupComponent, + ResetPasswordComponent, + ResetPasswordConfirmComponent, + VerifyEmailComponent + ], + imports: [ + CommonModule, + AuthRoutingModule, + SharedModule + ], + exports: [ + AuthComponent, + LoginComponent, + SignupComponent, + ResetPasswordComponent, + ResetPasswordConfirmComponent, + VerifyEmailComponent + ] +}) +export class AuthModule { } diff --git a/src/app/components/challenge-create/challenge-create-routing.module.ts b/src/app/components/challenge-create/challenge-create-routing.module.ts new file mode 100644 index 000000000..cb6d27fa6 --- /dev/null +++ b/src/app/components/challenge-create/challenge-create-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ChallengeCreateComponent } from './challenge-create.component'; + +const routes: Routes = [ + { + path: '', + component: ChallengeCreateComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ChallengeCreateRoutingModule { } diff --git a/src/app/components/challenge-create/challenge-create.module.ts b/src/app/components/challenge-create/challenge-create.module.ts new file mode 100644 index 000000000..2e1c81e16 --- /dev/null +++ b/src/app/components/challenge-create/challenge-create.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; +import { ChallengeCreateRoutingModule } from './challenge-create-routing.module'; + +import { ChallengeCreateComponent } from './challenge-create.component'; + +@NgModule({ + declarations: [ + ChallengeCreateComponent + ], + imports: [ + CommonModule, + ChallengeCreateRoutingModule, + SharedModule + ], + exports: [ + ChallengeCreateComponent + ] +}) +export class ChallengeCreateModule { } diff --git a/src/app/components/challenge/challenge-routing.module.ts b/src/app/components/challenge/challenge-routing.module.ts new file mode 100644 index 000000000..65283f7c8 --- /dev/null +++ b/src/app/components/challenge/challenge-routing.module.ts @@ -0,0 +1,45 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ChallengeComponent } from './challenge.component'; +import { ChallengesettingsComponent } from './challengesettings/challengesettings.component'; +import { ChallengeoverviewComponent} from './challengeoverview/challengeoverview.component'; +import { ChallengeevaluationComponent } from './challengeevaluation/challengeevaluation.component'; +import { ChallengephasesComponent} from './challengephases/challengephases.component'; +import { ChallengeparticipateComponent } from './challengeparticipate/challengeparticipate.component'; +import { ChallengeleaderboardComponent } from './challengeleaderboard/challengeleaderboard.component'; +import { ChallengesubmitComponent } from './challengesubmit/challengesubmit.component'; +import { ChallengesubmissionsComponent } from './challengesubmissions/challengesubmissions.component'; +import { + ChallengeviewallsubmissionsComponent +} from './challengeviewallsubmissions/challengeviewallsubmissions.component'; + + +const routes: Routes = [ + { + path: '', + component: ChallengeComponent, + children: [ + {path: '', redirectTo: 'overview', pathMatch: 'full'}, + {path: 'overview', component: ChallengeoverviewComponent}, + {path: 'evaluation', component: ChallengeevaluationComponent}, + {path: 'phases', component: ChallengephasesComponent}, + {path: 'participate', component: ChallengeparticipateComponent}, + {path: 'submit', component: ChallengesubmitComponent}, + {path: 'my-submissions', component: ChallengesubmissionsComponent}, + {path: 'my-submissions/:phase', component: ChallengesubmissionsComponent}, + {path: 'mysubmissions/:phase/:submission', component: ChallengesubmissionsComponent}, + {path: 'view-all-submissions', component: ChallengeviewallsubmissionsComponent}, + {path: 'leaderboard', component: ChallengeleaderboardComponent}, + {path: 'leaderboard/:split', component: ChallengeleaderboardComponent}, + {path: 'leaderboard/:split/:entry', component: ChallengeleaderboardComponent}, + {path: 'settings', component: ChallengesettingsComponent} + ] + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ChallengeRoutingModule { } diff --git a/src/app/components/challenge/challenge.module.ts b/src/app/components/challenge/challenge.module.ts new file mode 100644 index 000000000..201fdcc15 --- /dev/null +++ b/src/app/components/challenge/challenge.module.ts @@ -0,0 +1,64 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MatChipsModule } from '@angular/material/chips'; +import { MatIconModule } from '@angular/material/icon'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatDividerModule } from '@angular/material/divider'; +import { ChallengeComponent } from './challenge.component'; +import { ChallengesettingsComponent } from './challengesettings/challengesettings.component'; +import { ChallengeoverviewComponent} from './challengeoverview/challengeoverview.component'; +import { ChallengeevaluationComponent } from './challengeevaluation/challengeevaluation.component'; +import { ChallengephasesComponent} from './challengephases/challengephases.component'; +import { ChallengeparticipateComponent } from './challengeparticipate/challengeparticipate.component'; +import { ChallengeleaderboardComponent } from './challengeleaderboard/challengeleaderboard.component'; +import { ChallengesubmitComponent } from './challengesubmit/challengesubmit.component'; +import { ChallengesubmissionsComponent } from './challengesubmissions/challengesubmissions.component'; +import { ChallengeviewallsubmissionsComponent } from './challengeviewallsubmissions/challengeviewallsubmissions.component'; +import { PhasecardComponent } from './challengephases/phasecard/phasecard.component'; +import { EditphasemodalComponent } from './challengephases/editphasemodal/editphasemodal.component'; + +import { ChallengeRoutingModule } from './challenge-routing.module'; +import { ChallengelistModule } from '../publiclists/challengelist/challengelist.module'; +import { SharedModule } from '../../shared.module'; + +@NgModule({ + declarations: [ + ChallengeComponent, + ChallengesettingsComponent, + ChallengeoverviewComponent, + ChallengeevaluationComponent, + ChallengephasesComponent, + ChallengeparticipateComponent, + ChallengeleaderboardComponent, + ChallengesubmitComponent, + ChallengesubmissionsComponent, + ChallengeviewallsubmissionsComponent, + PhasecardComponent + ], + imports: [ + CommonModule, + ChallengeRoutingModule, + SharedModule, + MatChipsModule, + MatIconModule, + MatSelectModule, + MatTableModule, + MatDividerModule, + ], + exports: [ + ChallengeComponent, + ChallengesettingsComponent, + ChallengeoverviewComponent, + ChallengeevaluationComponent, + ChallengephasesComponent, + ChallengeparticipateComponent, + ChallengeleaderboardComponent, + ChallengesubmitComponent, + ChallengesubmissionsComponent, + ChallengeviewallsubmissionsComponent, + PhasecardComponent, + ] +}) +export class ChallengeModule { } diff --git a/src/app/components/contact/contact-routing.module.ts b/src/app/components/contact/contact-routing.module.ts new file mode 100644 index 000000000..dd449fc87 --- /dev/null +++ b/src/app/components/contact/contact-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ContactComponent } from './contact.component'; + +const routes: Routes = [ + { + path: '', + component: ContactComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ContactRoutingModule { } diff --git a/src/app/components/contact/contact.module.ts b/src/app/components/contact/contact.module.ts new file mode 100644 index 000000000..3b1f2f99d --- /dev/null +++ b/src/app/components/contact/contact.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; +import { ContactComponent } from './contact.component'; +import { ContactRoutingModule } from './contact-routing.module'; + +@NgModule({ + declarations: [ + ContactComponent + ], + imports: [ + CommonModule, + ContactRoutingModule, + SharedModule + ], + exports: [ + ContactComponent + ] +}) +export class ContactModule { } diff --git a/src/app/components/dashboard/dashboard-routing.module.ts b/src/app/components/dashboard/dashboard-routing.module.ts new file mode 100644 index 000000000..4d6e86504 --- /dev/null +++ b/src/app/components/dashboard/dashboard-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { DashboardComponent } from './dashboard.component'; + +const routes: Routes = [ + { + path: '', + component: DashboardComponent, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class DashboardRoutingModule { } diff --git a/src/app/components/dashboard/dashboard.module.ts b/src/app/components/dashboard/dashboard.module.ts new file mode 100644 index 000000000..456aaa1e8 --- /dev/null +++ b/src/app/components/dashboard/dashboard.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; +import { DashboardRoutingModule } from './dashboard-routing.module'; +import { DashboardComponent } from './dashboard.component'; +import { DashboardContentComponent } from './dashboard-content/dashboard-content.component'; + +@NgModule({ + declarations: [ + DashboardComponent, + DashboardContentComponent + ], + imports: [ + CommonModule, + DashboardRoutingModule, + SharedModule + ], + exports: [ + DashboardComponent, + DashboardContentComponent + ] +}) +export class DashboardModule { } diff --git a/src/app/components/get-involved/get-involved-routing.module.ts b/src/app/components/get-involved/get-involved-routing.module.ts new file mode 100644 index 000000000..86a2d2769 --- /dev/null +++ b/src/app/components/get-involved/get-involved-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { GetInvolvedComponent } from './get-involved.component'; + +const routes: Routes = [ + { + path: '', + component: GetInvolvedComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class GetInvolvedRoutingModule { } diff --git a/src/app/components/get-involved/get-involved.module.ts b/src/app/components/get-involved/get-involved.module.ts new file mode 100644 index 000000000..53343b435 --- /dev/null +++ b/src/app/components/get-involved/get-involved.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; + +import { GetInvolvedComponent } from './get-involved.component'; +import { GetInvolvedRoutingModule } from './get-involved-routing.module'; + +@NgModule({ + declarations: [ + GetInvolvedComponent + ], + imports: [ + CommonModule, + GetInvolvedRoutingModule, + SharedModule + ], + exports: [ + GetInvolvedComponent + ] +}) +export class GetInvolvedModule { } diff --git a/src/app/components/home/home-routing.module.ts b/src/app/components/home/home-routing.module.ts new file mode 100644 index 000000000..0e9faa187 --- /dev/null +++ b/src/app/components/home/home-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { HomeComponent } from './home.component'; + +const routes: Routes = [ + { + path: '', + component: HomeComponent, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class HomeRoutingModule { } diff --git a/src/app/components/home/home.module.ts b/src/app/components/home/home.module.ts new file mode 100644 index 000000000..6794d8fdd --- /dev/null +++ b/src/app/components/home/home.module.ts @@ -0,0 +1,40 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../shared.module'; +import { HomeRoutingModule } from './home-routing.module'; +import { NgxTwitterTimelineModule } from 'ngx-twitter-timeline'; +import { HomeComponent } from './home.component'; +import { PartnersComponent } from './partners/partners.component'; +import { RulesComponent } from './rules/rules.component'; +import { TestimonialsComponent } from './testimonials/testimonials.component'; +import { HomemainComponent } from './homemain/homemain.component'; +import { TwitterFeedComponent } from './twitter-feed/twitter-feed.component'; +import { FeaturedChallengesComponent } from './featured-challenges/featured-challenges.component'; + +@NgModule({ + declarations: [ + HomeComponent, + TwitterFeedComponent, + PartnersComponent, + RulesComponent, + TestimonialsComponent, + HomemainComponent, + FeaturedChallengesComponent + ], + imports: [ + CommonModule, + HomeRoutingModule, + SharedModule, + NgxTwitterTimelineModule + ], + exports: [ + HomeComponent, + TwitterFeedComponent, + PartnersComponent, + RulesComponent, + TestimonialsComponent, + HomemainComponent, + FeaturedChallengesComponent + ] +}) +export class HomeModule { } diff --git a/src/app/components/our-team/our-team-routing.module.ts b/src/app/components/our-team/our-team-routing.module.ts new file mode 100644 index 000000000..c604a90ec --- /dev/null +++ b/src/app/components/our-team/our-team-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { OurTeamComponent } from './our-team.component'; + +const routes: Routes = [ + { + path: '', + component: OurTeamComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class OurTeamRoutingModule { } diff --git a/src/app/components/our-team/our-team.module.ts b/src/app/components/our-team/our-team.module.ts new file mode 100644 index 000000000..7938253fb --- /dev/null +++ b/src/app/components/our-team/our-team.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { OurTeamRoutingModule } from './our-team-routing.module'; +import { SharedModule } from '../../shared.module'; +import { OurTeamComponent } from './our-team.component'; + +@NgModule({ + declarations: [ + OurTeamComponent + ], + imports: [ + CommonModule, + OurTeamRoutingModule, + SharedModule + ], + exports: [ + OurTeamComponent + ] +}) +export class OurTeamModule { } diff --git a/src/app/components/privacy-policy/privacy-policy-routing.module.ts b/src/app/components/privacy-policy/privacy-policy-routing.module.ts new file mode 100644 index 000000000..2cf52c9ed --- /dev/null +++ b/src/app/components/privacy-policy/privacy-policy-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { PrivacyPolicyComponent } from './privacy-policy.component'; + +const routes: Routes = [ + { + path: 'privacy-policy', + component: PrivacyPolicyComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class PrivacyPolicyRoutingModule { } diff --git a/src/app/components/privacy-policy/privacy-policy.module.ts b/src/app/components/privacy-policy/privacy-policy.module.ts new file mode 100644 index 000000000..ebdcf4c61 --- /dev/null +++ b/src/app/components/privacy-policy/privacy-policy.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { PrivacyPolicyComponent } from './privacy-policy.component'; +import { PrivacyPolicyRoutingModule } from './privacy-policy-routing.module'; +import { SharedModule } from '../../shared.module'; + +@NgModule({ + declarations: [ + PrivacyPolicyComponent + ], + imports: [ + CommonModule, + PrivacyPolicyRoutingModule, + SharedModule + ], + exports: [ + PrivacyPolicyComponent + ] +}) +export class PrivacyPolicyModule { } diff --git a/src/app/components/profile/profile-routing.module.ts b/src/app/components/profile/profile-routing.module.ts new file mode 100644 index 000000000..3ddad234f --- /dev/null +++ b/src/app/components/profile/profile-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ProfileComponent } from './profile.component'; + +const routes: Routes = [ + { + path: '', + component: ProfileComponent + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ProfileRoutingModule { } diff --git a/src/app/components/profile/profile.module.ts b/src/app/components/profile/profile.module.ts new file mode 100644 index 000000000..e27b0d76b --- /dev/null +++ b/src/app/components/profile/profile.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ProfileComponent } from './profile.component'; +import { ProfileRoutingModule } from './profile-routing.module'; +import { SharedModule } from '../../shared.module'; +@NgModule({ + declarations: [ + ProfileComponent +], + imports: [ + CommonModule, + ProfileRoutingModule, + SharedModule + ], + exports: [ + ProfileComponent + ] +}) +export class ProfileModule { } diff --git a/src/app/components/publiclists/challengelist/challengelist.module.ts b/src/app/components/publiclists/challengelist/challengelist.module.ts new file mode 100644 index 000000000..1d5bcc1cf --- /dev/null +++ b/src/app/components/publiclists/challengelist/challengelist.module.ts @@ -0,0 +1,32 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '../../../shared.module'; + +import { ChallengecardComponent } from './challengecard/challengecard.component'; +import { ChallengelistComponent } from './challengelist.component'; +import { TeamlistComponent } from '../teamlist/teamlist.component'; +import { TeamcardComponent } from '../teamlist/teamcard/teamcard.component'; + +import { CardlistComponent } from '../../utility/cardlist/cardlist.component'; + +@NgModule({ + declarations: [ + ChallengelistComponent, + ChallengecardComponent, + TeamcardComponent, + TeamlistComponent, + CardlistComponent + ], + imports: [ + CommonModule, + SharedModule + ], + exports: [ + ChallengelistComponent, + ChallengecardComponent, + TeamcardComponent, + TeamlistComponent, + CardlistComponent + ] +}) +export class ChallengelistModule { } diff --git a/src/app/components/publiclists/publiclists-routing.module.ts b/src/app/components/publiclists/publiclists-routing.module.ts new file mode 100644 index 000000000..d45d6922b --- /dev/null +++ b/src/app/components/publiclists/publiclists-routing.module.ts @@ -0,0 +1,43 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { PubliclistsComponent } from './publiclists.component'; +import { ChallengelistComponent } from './challengelist/challengelist.component'; +import { TeamlistComponent } from './teamlist/teamlist.component'; + +const routes: Routes = [ + { + path: '', + component: PubliclistsComponent, + children: [ + {path: '', redirectTo: 'all', pathMatch: 'full'}, + {path: 'all', component: ChallengelistComponent}, + {path: 'me', component: ChallengelistComponent} + ] + } +]; + +const teamListRoutes: Routes = [ + { + path: '', + component: PubliclistsComponent, + children: [ + {path: '', redirectTo: 'participants', pathMatch: 'full'}, + {path: 'participants', component: TeamlistComponent}, + {path: 'hosts', component: TeamlistComponent} + ] + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class PubliclistsRoutingModule { } + + +@NgModule({ + imports: [RouterModule.forChild(teamListRoutes)], + exports: [RouterModule] +}) +export class TeamlistsRoutingModule { } diff --git a/src/app/components/publiclists/publiclists.module.ts b/src/app/components/publiclists/publiclists.module.ts new file mode 100644 index 000000000..6772d4a29 --- /dev/null +++ b/src/app/components/publiclists/publiclists.module.ts @@ -0,0 +1,39 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SharedModule } from '../../shared.module'; +import { ChallengecardComponent } from './challengelist/challengecard/challengecard.component'; +import { ChallengelistModule } from './challengelist/challengelist.module'; + +import { PubliclistsRoutingModule } from './publiclists-routing.module'; +import { TeamlistsRoutingModule } from './publiclists-routing.module'; + +import { PubliclistsComponent } from './publiclists.component'; +import { TeamlistComponent } from './teamlist/teamlist.component'; + +@NgModule({ + declarations: [ + PubliclistsComponent + ], + imports: [ + CommonModule, + PubliclistsRoutingModule, + ChallengelistModule, + SharedModule + ] +}) +export class PubliclistsModule { } + +@NgModule({ + declarations: [ + TeamlistComponent + ], + imports: [ + CommonModule, + ChallengelistModule, + TeamlistsRoutingModule, + PubliclistsModule, + SharedModule + ] +}) +export class TeamlistsModule { } diff --git a/src/app/components/utility/utility.module.ts b/src/app/components/utility/utility.module.ts new file mode 100644 index 000000000..bd00fbc60 --- /dev/null +++ b/src/app/components/utility/utility.module.ts @@ -0,0 +1,56 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +import { TextareaAutosizeModule } from 'ngx-textarea-autosize'; +import { MatSelectModule } from '@angular/material/select'; +import { MatChipsModule } from '@angular/material/chips'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatIconModule } from '@angular/material/icon'; +import { MatCheckboxModule } from '@angular/material'; + +import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime'; + +import { ForceloginComponent } from './forcelogin/forcelogin.component'; +import { ConfirmComponent } from './confirm/confirm.component'; +import { LoadingComponent } from './loading/loading.component'; +import { SelectphaseComponent } from './selectphase/selectphase.component'; +import { InputComponent } from './input/input.component'; +import { SideBarComponent } from './side-bar/side-bar.component'; + +@NgModule({ + declarations: [ + ForceloginComponent, + InputComponent, + SideBarComponent, + ConfirmComponent, + LoadingComponent, + SelectphaseComponent, + + ], + imports: [ + CommonModule, + OwlDateTimeModule, + OwlNativeDateTimeModule, + FormsModule, + RouterModule, + TextareaAutosizeModule, + MatSelectModule, + MatChipsModule, + MatMenuModule, + MatIconModule, + MatCheckboxModule + ], + + exports: [ + ForceloginComponent, + InputComponent, + OwlDateTimeModule, + OwlNativeDateTimeModule, + SideBarComponent, + ConfirmComponent, + LoadingComponent, + SelectphaseComponent, + ] +}) +export class UtilityModule { } diff --git a/src/app/shared.module.ts b/src/app/shared.module.ts new file mode 100644 index 000000000..2512534b9 --- /dev/null +++ b/src/app/shared.module.ts @@ -0,0 +1,42 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { FormsModule } from '@angular/forms'; + +import { HeaderStaticComponent } from './components/nav/header-static/header-static.component'; +import { FooterComponent } from './components/nav/footer/footer.component'; +import { NotFoundComponent } from './components/not-found/not-found.component'; + +import { PasswordMismatchValidatorDirective } from './Directives/password.validator'; +import { EmailValidatorDirective } from './Directives/email.validator'; + +import { ChallengelistModule } from './components/publiclists/challengelist/challengelist.module'; +import { UtilityModule } from './components/utility/utility.module'; + +@NgModule({ + declarations: [ + PasswordMismatchValidatorDirective, + EmailValidatorDirective, + HeaderStaticComponent, + FooterComponent, + NotFoundComponent + ], + imports: [ + CommonModule, + RouterModule, + FormsModule, + UtilityModule, + ], + exports: [ + PasswordMismatchValidatorDirective, + EmailValidatorDirective, + CommonModule, + RouterModule, + FormsModule, + HeaderStaticComponent, + FooterComponent, + UtilityModule, + NotFoundComponent + ] +}) +export class SharedModule { } diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 39ba8dbac..8a9839914 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -3,7 +3,7 @@ "compilerOptions": { "outDir": "../out-tsc/app", "baseUrl": "./", - "module": "es2015", + "module": "esnext", "types": [] }, "exclude": [ diff --git a/tsconfig.json b/tsconfig.json index 4ad3a431d..69d05daf1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "es2017", "dom" ], - "module": "es2015", + "module": "esnext", "baseUrl": "./" } } From a35c1b3ea5eb61ab8270577e116beaca896d7529 Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Wed, 15 Jan 2020 11:48:36 +0100 Subject: [PATCH 3/6] Lazy loaded compoents to reduce bundle size --- src/app/components/publiclists/publiclists.module.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/components/publiclists/publiclists.module.ts b/src/app/components/publiclists/publiclists.module.ts index 6772d4a29..b8869fa0f 100644 --- a/src/app/components/publiclists/publiclists.module.ts +++ b/src/app/components/publiclists/publiclists.module.ts @@ -20,20 +20,24 @@ import { TeamlistComponent } from './teamlist/teamlist.component'; PubliclistsRoutingModule, ChallengelistModule, SharedModule + ], + exports: [ + PubliclistsComponent, + ChallengelistModule ] }) export class PubliclistsModule { } @NgModule({ - declarations: [ - TeamlistComponent - ], + declarations: [], imports: [ CommonModule, - ChallengelistModule, TeamlistsRoutingModule, PubliclistsModule, SharedModule + ], + exports: [ + PubliclistsModule, ] }) export class TeamlistsModule { } From a237578b5684a5378a8520a6cbc6675382bef9a9 Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Wed, 15 Jan 2020 12:01:14 +0100 Subject: [PATCH 4/6] Fixed errors --- src/app/components/challenge/challenge.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/components/challenge/challenge.module.ts b/src/app/components/challenge/challenge.module.ts index 201fdcc15..e52107650 100644 --- a/src/app/components/challenge/challenge.module.ts +++ b/src/app/components/challenge/challenge.module.ts @@ -6,6 +6,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatSelectModule } from '@angular/material/select'; import { MatTableModule } from '@angular/material/table'; import { MatDividerModule } from '@angular/material/divider'; +import { MatCheckboxModule } from '@angular/material/checkbox'; import { ChallengeComponent } from './challenge.component'; import { ChallengesettingsComponent } from './challengesettings/challengesettings.component'; import { ChallengeoverviewComponent} from './challengeoverview/challengeoverview.component'; @@ -45,6 +46,7 @@ import { SharedModule } from '../../shared.module'; MatIconModule, MatSelectModule, MatTableModule, + MatCheckboxModule, MatDividerModule, ], exports: [ From c16e99af04a34ec59105d55209989d7657d8f60a Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Wed, 15 Jan 2020 12:08:46 +0100 Subject: [PATCH 5/6] Fixed errors --- src/app/components/challenge/challenge.module.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/challenge/challenge.module.ts b/src/app/components/challenge/challenge.module.ts index e52107650..519af4f24 100644 --- a/src/app/components/challenge/challenge.module.ts +++ b/src/app/components/challenge/challenge.module.ts @@ -44,6 +44,7 @@ import { SharedModule } from '../../shared.module'; SharedModule, MatChipsModule, MatIconModule, + ChallengelistModule, MatSelectModule, MatTableModule, MatCheckboxModule, From 607a2978552a7b8c9489ce0c3b9a4fcd1a6243bc Mon Sep 17 00:00:00 2001 From: jayy <35180217+nsjcorps@users.noreply.github.com> Date: Wed, 15 Jan 2020 12:15:38 +0100 Subject: [PATCH 6/6] Fixed errors --- src/app/components/challenge/challenge.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/components/challenge/challenge.module.ts b/src/app/components/challenge/challenge.module.ts index 519af4f24..3fa206eae 100644 --- a/src/app/components/challenge/challenge.module.ts +++ b/src/app/components/challenge/challenge.module.ts @@ -5,6 +5,7 @@ import { MatChipsModule } from '@angular/material/chips'; import { MatIconModule } from '@angular/material/icon'; import { MatSelectModule } from '@angular/material/select'; import { MatTableModule } from '@angular/material/table'; +import { MatMenuModule } from '@angular/material/menu'; import { MatDividerModule } from '@angular/material/divider'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { ChallengeComponent } from './challenge.component'; @@ -49,6 +50,7 @@ import { SharedModule } from '../../shared.module'; MatTableModule, MatCheckboxModule, MatDividerModule, + MatMenuModule ], exports: [ ChallengeComponent,