59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
import * as angular from 'angular';
|
|
import { quayConfig } from './quay.config';
|
|
import quayPages from './quay-pages.module';
|
|
import quayRun from './quay.run';
|
|
import { ViewArrayImpl } from './services/view-array/view-array.impl';
|
|
import NAME_PATTERNS from './constants/name-patterns.constant';
|
|
import { routeConfig } from './quay.routes';
|
|
import { INJECTED_CONFIG, INJECTED_FEATURES, INJECTED_ENDPOINTS } from './constants/injected-values.constant';
|
|
|
|
|
|
var quayDependencies: string[] = [
|
|
quayPages,
|
|
'ngRoute',
|
|
'chieffancypants.loadingBar',
|
|
'cfp.hotkeys',
|
|
'angular-tour',
|
|
'restangular',
|
|
'angularMoment',
|
|
'mgcrea.ngStrap',
|
|
'ngCookies',
|
|
'ngSanitize',
|
|
'angular-md5',
|
|
'pasvaz.bindonce',
|
|
'ansiToHtml',
|
|
'core-ui',
|
|
'core-config-setup',
|
|
'infinite-scroll',
|
|
'react'
|
|
];
|
|
|
|
if (INJECTED_CONFIG && (INJECTED_CONFIG.MIXPANEL_KEY ||
|
|
INJECTED_CONFIG.MUNCHKIN_KEY ||
|
|
INJECTED_CONFIG.GOOGLE_ANALYTICS_KEY)) {
|
|
quayDependencies.push('angulartics');
|
|
}
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.MIXPANEL_KEY) {
|
|
quayDependencies.push('angulartics.mixpanel');
|
|
}
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.MUNCHKIN_KEY) {
|
|
quayDependencies.push('angulartics.marketo');
|
|
}
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.GOOGLE_ANALYTICS_KEY) {
|
|
quayDependencies.push('angulartics.google.analytics');
|
|
}
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.RECAPTCHA_SITE_KEY) {
|
|
quayDependencies.push('vcRecaptcha');
|
|
}
|
|
|
|
export default angular
|
|
.module('quay', quayDependencies)
|
|
.config(quayConfig)
|
|
.config(routeConfig)
|
|
.constant('NAME_PATTERNS', NAME_PATTERNS)
|
|
.constant('INJECTED_CONFIG', INJECTED_CONFIG)
|
|
.constant('INJECTED_FEATURES', INJECTED_FEATURES)
|
|
.constant('INJECTED_ENDPOINTS', INJECTED_ENDPOINTS)
|
|
.service('ViewArray', ViewArrayImpl)
|
|
.run(quayRun)
|
|
.name;
|