2017-01-19 08:53:38 +00:00
|
|
|
import * as angular from 'angular';
|
2017-01-19 10:10:00 +00:00
|
|
|
import { quayConfig } from './quay.config';
|
2017-01-19 08:53:38 +00:00
|
|
|
import quayPages from './quay-pages.module';
|
|
|
|
import quayRun from './quay.run';
|
2017-01-23 09:57:00 +00:00
|
|
|
import { ViewArrayImpl } from './services/view-array/view-array.impl';
|
2017-01-21 00:24:55 +00:00
|
|
|
import NAME_PATTERNS from './constants/name-patterns.constant';
|
|
|
|
import { routeConfig } from './quay.routes';
|
2017-01-23 20:34:22 +00:00
|
|
|
import { INJECTED_CONFIG, INJECTED_FEATURES, INJECTED_ENDPOINTS } from './constants/injected-values.constant';
|
2017-01-19 08:53:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
];
|
|
|
|
|
2017-02-01 08:29:56 +00:00
|
|
|
if (INJECTED_CONFIG && (INJECTED_CONFIG.MIXPANEL_KEY ||
|
|
|
|
INJECTED_CONFIG.MUNCHKIN_KEY ||
|
|
|
|
INJECTED_CONFIG.GOOGLE_ANALYTICS_KEY)) {
|
2017-01-19 08:53:38 +00:00
|
|
|
quayDependencies.push('angulartics');
|
|
|
|
}
|
2017-01-23 20:34:22 +00:00
|
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.MIXPANEL_KEY) {
|
2017-01-19 08:53:38 +00:00
|
|
|
quayDependencies.push('angulartics.mixpanel');
|
|
|
|
}
|
2017-01-23 20:34:22 +00:00
|
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.MUNCHKIN_KEY) {
|
2017-01-19 08:53:38 +00:00
|
|
|
quayDependencies.push('angulartics.marketo');
|
|
|
|
}
|
2017-01-23 20:34:22 +00:00
|
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.GOOGLE_ANALYTICS_KEY) {
|
2017-01-19 08:53:38 +00:00
|
|
|
quayDependencies.push('angulartics.google.analytics');
|
|
|
|
}
|
2017-01-23 20:34:22 +00:00
|
|
|
if (INJECTED_CONFIG && INJECTED_CONFIG.RECAPTCHA_SITE_KEY) {
|
2017-01-19 08:53:38 +00:00
|
|
|
quayDependencies.push('vcRecaptcha');
|
|
|
|
}
|
|
|
|
|
|
|
|
export default angular
|
|
|
|
.module('quay', quayDependencies)
|
|
|
|
.config(quayConfig)
|
2017-01-21 00:24:55 +00:00
|
|
|
.config(routeConfig)
|
|
|
|
.constant('NAME_PATTERNS', NAME_PATTERNS)
|
2017-01-23 20:34:22 +00:00
|
|
|
.constant('INJECTED_CONFIG', INJECTED_CONFIG)
|
|
|
|
.constant('INJECTED_FEATURES', INJECTED_FEATURES)
|
|
|
|
.constant('INJECTED_ENDPOINTS', INJECTED_ENDPOINTS)
|
2017-01-23 09:57:00 +00:00
|
|
|
.service('ViewArray', ViewArrayImpl)
|
2017-01-19 08:53:38 +00:00
|
|
|
.run(quayRun)
|
2017-02-01 08:29:56 +00:00
|
|
|
.name;
|