mirror of
https://github.com/nasa/openmct.git
synced 2025-02-06 11:09:21 +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": {
|
"paths": {
|
||||||
"legacyRegistry": "src/legacyRegistry",
|
"legacyRegistry": "src/legacyRegistry",
|
||||||
"angular": "platform/framework/lib/angular.min",
|
"angular": "platform/framework/lib/angular.min",
|
||||||
"angular-route": "platform/framework/lib/angular-route.min",
|
"moment": 'platform/telemetry/lib/moment.min'
|
||||||
"moment": 'platform/telemetry/lib/moment.min',
|
|
||||||
"moment-duration-format": 'platform/features/clock/lib/moment-duration-format'
|
|
||||||
},
|
},
|
||||||
"shim": {
|
"shim": {
|
||||||
"angular": {
|
"angular": {
|
||||||
"exports": "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
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* 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(
|
define(
|
||||||
['moment', 'moment-duration-format'],
|
['moment', '../../lib/moment-duration-format'],
|
||||||
function (moment) {
|
function (moment) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -21,6 +21,14 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define, window, requirejs*/
|
/*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
|
* Implements the framework layer, which handles the loading of bundles
|
||||||
* and the wiring-together of the extensions they expose.
|
* and the wiring-together of the extensions they expose.
|
||||||
@ -32,7 +40,7 @@ define(
|
|||||||
'../lib/es6-promise-2.0.0.min',
|
'../lib/es6-promise-2.0.0.min',
|
||||||
'./FrameworkLayer',
|
'./FrameworkLayer',
|
||||||
'angular',
|
'angular',
|
||||||
'angular-route'
|
'../lib/angular-route.min'
|
||||||
],
|
],
|
||||||
function (
|
function (
|
||||||
require,
|
require,
|
||||||
|
@ -44,14 +44,7 @@ require.config({
|
|||||||
|
|
||||||
paths: {
|
paths: {
|
||||||
'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min',
|
'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min',
|
||||||
'moment': 'platform/telemetry/lib/moment.min',
|
'moment': 'platform/telemetry/lib/moment.min'
|
||||||
'moment-duration-format': 'platform/features/clock/lib/moment-duration-format'
|
|
||||||
},
|
|
||||||
|
|
||||||
shim: {
|
|
||||||
'moment-duration-format': {
|
|
||||||
deps: [ 'moment' ]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// dynamically load all test files
|
// dynamically load all test files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user