mirror of
https://github.com/nasa/openmct.git
synced 2025-01-29 15:43:52 +00:00
[API Refactor] Move out non-global require config
This commit is contained in:
parent
45142e03dc
commit
69c5b110bf
10
main.js
10
main.js
@ -25,19 +25,11 @@ requirejs.config({
|
||||
"paths": {
|
||||
"legacyRegistry": "src/legacyRegistry",
|
||||
"angular": "platform/framework/lib/angular.min",
|
||||
"angular-route": "platform/framework/lib/angular-route.min",
|
||||
"moment": 'platform/telemetry/lib/moment.min',
|
||||
"moment-duration-format": 'platform/features/clock/lib/moment-duration-format'
|
||||
"moment": 'platform/telemetry/lib/moment.min'
|
||||
},
|
||||
"shim": {
|
||||
"angular": {
|
||||
"exports": "angular"
|
||||
},
|
||||
"angular-route": {
|
||||
"deps": [ "angular" ]
|
||||
},
|
||||
"moment-duration-format": {
|
||||
"deps": [ 'moment' ]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -19,10 +19,18 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
/*global define,requirejs*/
|
||||
|
||||
requirejs.config({
|
||||
shim: {
|
||||
'platform/features/clock/lib/moment-duration-format': {
|
||||
deps: [ 'moment' ]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
define(
|
||||
['moment', 'moment-duration-format'],
|
||||
['moment', '../../lib/moment-duration-format'],
|
||||
function (moment) {
|
||||
"use strict";
|
||||
|
||||
|
@ -21,6 +21,14 @@
|
||||
*****************************************************************************/
|
||||
/*global define, window, requirejs*/
|
||||
|
||||
requirejs.config({
|
||||
shim: {
|
||||
'platform/framework/lib/angular-route.min': {
|
||||
deps: [ 'angular' ]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Implements the framework layer, which handles the loading of bundles
|
||||
* and the wiring-together of the extensions they expose.
|
||||
@ -32,7 +40,7 @@ define(
|
||||
'../lib/es6-promise-2.0.0.min',
|
||||
'./FrameworkLayer',
|
||||
'angular',
|
||||
'angular-route'
|
||||
'../lib/angular-route.min'
|
||||
],
|
||||
function (
|
||||
require,
|
||||
|
@ -44,14 +44,7 @@ require.config({
|
||||
|
||||
paths: {
|
||||
'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min',
|
||||
'moment': 'platform/telemetry/lib/moment.min',
|
||||
'moment-duration-format': 'platform/features/clock/lib/moment-duration-format'
|
||||
},
|
||||
|
||||
shim: {
|
||||
'moment-duration-format': {
|
||||
deps: [ 'moment' ]
|
||||
}
|
||||
'moment': 'platform/telemetry/lib/moment.min'
|
||||
},
|
||||
|
||||
// dynamically load all test files
|
||||
|
Loading…
x
Reference in New Issue
Block a user