Skip to content

Commit

Permalink
Simplify module dependencies
Browse files Browse the repository at this point in the history
- move dependencies to where they are used
  • Loading branch information
irahopkinson committed May 31, 2018
1 parent 7d59429 commit e54fddb
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 22 deletions.
25 changes: 15 additions & 10 deletions src/angular-app/languageforge/lexicon/core/lexicon-core.module.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import * as angular from 'angular';

import { LexiconConfigService } from './lexicon-config.service';
import { LexiconEditorDataService } from './lexicon-editor-data.service';
import { LexiconEntryApiService } from './lexicon-entry-api.service';
import { LexiconLinkService } from './lexicon-link.service';
import { LexiconProjectService } from './lexicon-project.service';
import { LexiconRightsService } from './lexicon-rights.service';
import { LexiconSendReceiveApiService } from './lexicon-send-receive-api.service';
import { LexiconSendReceiveService } from './lexicon-send-receive.service';
import { LexiconUtilityService } from './lexicon-utility.service';
import {BreadcrumbModule} from '../../../bellows/core/breadcrumbs/breadcrumb.module';
import {CoreModule} from '../../../bellows/core/core.module';
import {LexiconConfigService} from './lexicon-config.service';
import {LexiconEditorDataService} from './lexicon-editor-data.service';
import {LexiconEntryApiService} from './lexicon-entry-api.service';
import {LexiconLinkService} from './lexicon-link.service';
import {LexiconProjectService} from './lexicon-project.service';
import {LexiconRightsService} from './lexicon-rights.service';
import {LexiconSendReceiveApiService} from './lexicon-send-receive-api.service';
import {LexiconSendReceiveService} from './lexicon-send-receive.service';
import {LexiconUtilityService} from './lexicon-utility.service';

export const LexiconCoreModule = angular
.module('lexiconCoreModule', [])
.module('lexiconCoreModule', [
BreadcrumbModule,
CoreModule
])
.service('lexProjectService', LexiconProjectService)
.service('lexLinkService', LexiconLinkService)
.service('lexConfigService', LexiconConfigService)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as angular from 'angular';

import {LexiconCoreModule} from '../../core/lexicon-core.module';
import {CommentBubbleComponent} from './comment-bubble.component';
import {CommentsRightPanelComponent} from './comments-right-panel.component';
import {CurrentEntryCommentCountComponent} from './current-entry-comment-count.component';
Expand All @@ -8,7 +9,9 @@ import {LexCommentsViewComponent} from './lex-comments-view.component';
import {RegardingFieldComponent} from './regarding-field.component';

export const EditorCommentsModule = angular
.module('lexCommentsModule', [])
.module('lexCommentsModule', [
LexiconCoreModule
])
.component('commentBubble', CommentBubbleComponent)
.component('commentsRightPanel', CommentsRightPanelComponent)
.component('currentEntryCommentCount', CurrentEntryCommentCountComponent)
Expand Down
3 changes: 3 additions & 0 deletions src/angular-app/languageforge/lexicon/editor/editor.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {ActivityAppModule} from '../../../bellows/apps/activity/activity-app.mod
import {CoreModule} from '../../../bellows/core/core.module';
import {NoticeModule} from '../../../bellows/core/notice/notice.module';
import {PuiUtilityModule} from '../../../bellows/shared/utils/pui-utils.module';
import {LexiconCoreModule} from '../core/lexicon-core.module';
import {EditorCommentsModule} from './comment/comment.module';
import {LexiconEditorComponent, LexiconEditorEntryController, LexiconEditorListController} from './editor.component';
import {EditorFieldModule} from './field/field.module';
Expand All @@ -17,6 +18,8 @@ export const LexiconEditorModule = angular
CoreModule,
NoticeModule,
PuiUtilityModule,
'palaso.ui.typeahead',
LexiconCoreModule,
EditorCommentsModule,
EditorFieldModule
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as angular from 'angular';
import {NoticeModule} from '../../../../bellows/core/notice/notice.module';
import {MockModule} from '../../../../bellows/shared/mock.module';
import {SoundModule} from '../../../../bellows/shared/sound.module';
import {LexiconCoreModule} from '../../core/lexicon-core.module';
import {EditorCommentsModule} from '../comment/comment.module';
import {FieldAudioComponent} from './dc-audio.component';
import {FieldEntryComponent} from './dc-entry.component';
Expand All @@ -21,10 +22,11 @@ import {FieldTextComponent} from './dc-text.component';
export const EditorFieldModule = angular
.module('editorFieldModule', [
'ngFileUpload',
EditorCommentsModule,
MockModule,
NoticeModule,
SoundModule
SoundModule,
LexiconCoreModule,
EditorCommentsModule
])
.component('dcAudio', FieldAudioComponent)
.component('dcEntry', FieldEntryComponent)
Expand Down
3 changes: 0 additions & 3 deletions src/angular-app/languageforge/lexicon/lexicon-app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'angular-sanitize';
import uiRouter from 'angular-ui-router';

import {ApiService} from '../../bellows/core/api/api.service';
import {BreadcrumbModule} from '../../bellows/core/breadcrumbs/breadcrumb.module';
import {CoreModule} from '../../bellows/core/core.module';
import {LexiconCoreModule} from './core/lexicon-core.module';
import {LexiconEditorModule} from './editor/editor.module';
Expand All @@ -16,9 +15,7 @@ export const LexiconAppModule = angular
'ui.bootstrap',
uiRouter,
'ngSanitize',
'palaso.ui.typeahead',
CoreModule,
BreadcrumbModule,
LexiconCoreModule,
LexiconEditorModule,
LexiconSettingsModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ import {CoreModule} from '../../../../bellows/core/core.module';
import {InputSystemsModule} from '../../../../bellows/core/input-systems/input-systems.service';
import {NoticeModule} from '../../../../bellows/core/notice/notice.module';
import {SelectLanguageModule} from '../../../../bellows/shared/select-language.component';
import {LexiconCoreModule} from '../../core/lexicon-core.module';
import {InputSystemsConfigurationComponent} from './configuration-input-systems.component';
import {OptionListConfigurationComponent} from './configuration-option-lists.component';
import {UnifiedConfigurationComponent} from './configuration-unified.component';

export const LexiconConfigurationModule = angular
.module('lexiconConfigurationModule', ['ui.bootstrap', 'ngDragToReorder', CoreModule, NoticeModule,
SelectLanguageModule, 'palaso.ui.tabset', 'palaso.ui.picklistEditor', 'palaso.util.model.transform',
InputSystemsModule])
.module('lexiconConfigurationModule', [
'ui.bootstrap',
'ngDragToReorder',
CoreModule,
InputSystemsModule,
NoticeModule,
SelectLanguageModule,
'palaso.ui.tabset',
'palaso.ui.typeahead',
'palaso.ui.picklistEditor',
'palaso.util.model.transform',
LexiconCoreModule
])
.component('lscUnified', UnifiedConfigurationComponent)
.component('lscInputSystems', InputSystemsConfigurationComponent)
.component('lscOptionLists', OptionListConfigurationComponent)
Expand Down
17 changes: 14 additions & 3 deletions src/angular-app/languageforge/lexicon/settings/settings.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,27 @@ import * as angular from 'angular';
import {CoreModule} from '../../../bellows/core/core.module';
import {NoticeModule} from '../../../bellows/core/notice/notice.module';
import {SelectLanguageModule} from '../../../bellows/shared/select-language.component';
import {LexiconCoreModule} from '../core/lexicon-core.module';
import {LexiconConfigurationComponent} from './configuration/configuration.component';
import {LexiconConfigurationModule} from './configuration/configuration.module';
import {LexiconImportComponent} from './import.component';
import {LexiconProjectSettingsComponent} from './project-settings.component';
import {LexiconSyncComponent} from './sync.component';

export const LexiconSettingsModule = angular
.module('lexiconSettingsModule', ['ui.bootstrap', 'ngFileUpload', CoreModule, NoticeModule,
LexiconConfigurationModule, 'palaso.ui.archiveProject', 'palaso.ui.deleteProject', SelectLanguageModule,
'palaso.ui.listview', 'palaso.ui.notice', 'palaso.ui.textdrop', 'palaso.ui.typeahead'])
.module('lexiconSettingsModule', [
'ui.bootstrap',
'ngFileUpload',
CoreModule,
NoticeModule,
SelectLanguageModule,
'palaso.ui.archiveProject',
'palaso.ui.deleteProject',
'palaso.ui.listview',
'palaso.ui.textdrop',
LexiconCoreModule,
LexiconConfigurationModule
])
.component('lexiconConfig', LexiconConfigurationComponent)
.component('lexiconImport', LexiconImportComponent)
.component('lexiconProjectSettings', LexiconProjectSettingsComponent)
Expand Down

0 comments on commit e54fddb

Please sign in to comment.