Skip to content

Commit

Permalink
chore(): fix loops in export/import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Apr 1, 2017
1 parent 15e8697 commit 5b80d0b
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 39 deletions.
11 changes: 0 additions & 11 deletions src/components/index.ts

This file was deleted.

36 changes: 20 additions & 16 deletions src/facebook.module.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import {
FacebookService,
FBCommentEmbedComponent,
FBCommentsComponent,
FBFollowComponent,
FBLikeComponent,
FBPageComponent,
FBPostComponent,
FBQuoteComponent,
FBSaveComponent,
FBSendComponent,
FBShareComponent,
FBVideoComponent
} from './';

import { FacebookService } from './providers/facebook';

import { FBCommentEmbedComponent } from './components/fb-comment-embed/fb-comment-embed';
import { FBCommentsComponent } from './components/fb-comments/fb-comments';
import { FBFollowComponent } from './components/fb-follow/fb-follow';
import { FBLikeComponent } from './components/fb-like/fb-like';
import { FBPageComponent } from './components/fb-page/fb-page';
import { FBPostComponent } from './components/fb-post/fb-post';
import { FBQuoteComponent } from './components/fb-quote/fb-quote';
import { FBSaveComponent } from './components/fb-save/fb-save';
import { FBSendComponent } from './components/fb-send/fb-send';
import { FBShareComponent } from './components/fb-share/fb-share';
import { FBVideoComponent } from './components/fb-video/fb-video';

const components: any[] = [
FBCommentEmbedComponent,
Expand All @@ -28,6 +28,10 @@ const components: any[] = [
FBVideoComponent
];

export function getComponents() {
return components;
}

/**
* The main module to import into your application.
* You only need to import this module if you wish to use the components in this library; otherwise, you could just import [FacebookService](../FacebookService) into your module instead.
Expand All @@ -49,8 +53,8 @@ const components: any[] = [
* ```
*/
@NgModule({
declarations: components,
exports: components
declarations: getComponents(),
exports: getComponents()
})
export class FacebookModule {
static forRoot(): ModuleWithProviders {
Expand Down
31 changes: 27 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
export * from './models';
export * from './components';
export * from './providers/facebook';
export * from './facebook.module';
// components
export { FBCommentEmbedComponent } from './components/fb-comment-embed/fb-comment-embed';
export { FBCommentsComponent } from './components/fb-comments/fb-comments';
export { FBFollowComponent } from './components/fb-follow/fb-follow';
export { FBLikeComponent } from './components/fb-like/fb-like';
export { FBPageComponent } from './components/fb-page/fb-page';
export { FBPostComponent } from './components/fb-post/fb-post';
export { FBQuoteComponent } from './components/fb-quote/fb-quote';
export { FBSaveComponent } from './components/fb-save/fb-save';
export { FBSendComponent } from './components/fb-send/fb-send';
export { FBShareComponent } from './components/fb-share/fb-share';
export { FBVideoComponent } from './components/fb-video/fb-video';

// models
export { AuthResponse } from './models/auth-response';
export { InitParams } from './models/init-params';
export { LoginOptions } from './models/login-options';
export { LoginResponse } from './models/login-response';
export { LoginStatus } from './models/login-status';
export { UIParams } from './models/ui-params';
export { UIResponse } from './models/ui-response';

// providers
export { FacebookService } from './providers/facebook';

// modules
export { FacebookModule } from './facebook.module';
7 changes: 0 additions & 7 deletions src/models/index.ts

This file was deleted.

9 changes: 8 additions & 1 deletion src/providers/facebook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { Injectable } from '@angular/core';
import { AuthResponse, InitParams, LoginOptions, LoginResponse, LoginStatus, UIParams, UIResponse } from '../models';
import { AuthResponse } from '../models/auth-response';
import { InitParams } from '../models/init-params';
import { LoginOptions } from '../models/login-options';
import { LoginResponse } from '../models/login-response';
import { LoginStatus } from '../models/login-status';
import { UIParams } from '../models/ui-params';
import { UIResponse } from '../models/ui-response';


declare var FB: any;

Expand Down
1 change: 1 addition & 0 deletions tsconfig-es5.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
Expand Down

0 comments on commit 5b80d0b

Please sign in to comment.